Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

SphinxSearch install error: "Cannot find data path location" in sphinx.conf

I'm trying to install the SphinxSearch plugin (version 20140114) on Vanilla 2.1.3, and I've already installed Sphinx 2.2.4 on my VPS.

I'm getting stuck in the plugin's install wizard at Step 2, when it asks to paste "full text of existing contents of sphinx.conf". It throws an error: Cannot find data path location defined inside of configuration text. Here's a screenshot.

For the "existing contents of sphinx.conf", I'm using /etc/sphinx/sphinx.conf. Here are the contents of that file.

Am I supposed to manually configure this sphinx.conf file before running the plugin installer? If so, does anyone have any example configurations?

I think I'm probably missing something really obvious, but I followed @mcu_hq's instructions as closely as I could, and I'm still getting stuck. Any ideas?

Many thanks to @mcu_hq for this awesome plugin... can't wait to get it running!

Tagged:

Comments

  • IIRC, I had to fill out the db information before it would work for me.

    Try filling out the top part of your sphinx.conf to include that.

    Also, here is a paste of my configuration: http://pastebin.com/raw.php?i=XAPyRYFL

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • peregrineperegrine MVP
    edited September 2014

    It throws an error: Cannot find data path location defined inside of configuration text. Here's a screenshot.

    because sphinxsearchservice is looking for - and errorchecking against

    preg_match("#\bpath\s+=\s+(.*\bdata\b)\b#", $Content, $Matches);

    https://github.com/mcuhq/SphinxSearchPlugin/blob/master/class.sphinxsearchservice.php#L59

    and you don't have the word "data" in your path. (for some reason it is always expecting a path with the word "data" in it).

    your path is:
    
    path            = /var/lib/sphinx/test1
    
    
    
    you could try 
    
    path            = /var/lib/sphinx/data/test1
    
    
    
    make sure you have a writeable folder called data
    
    
    /var/lib/sphinx/data/
    


    I suspect if you have a writeable folder /var/lib/sphinx/data
    and change path it should install properly.

    you could also manually build.

    http://vanillaforums.org/discussion/27177/tutorial-manually-installing-sphinxsearch-from-source-via-make-and-configure

    I tested manual install with

    SphinxSearch plugin (version 20140114) on Vanilla 2.1.3, and I've already installed Sphinx 2.2.4

    and it installs if path contains a "data" folder).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • elmorelmor New
    edited October 2014

    @hgtonight and @peregrine, great advice, many thanks. I added the DB info to the top and added 'data' to the path, and got the plugin installed.

    Unfortunately I still can't seem to get Sphinx itself running. Both indexer and searchd failed to start up. Here's the error from calling /usr/bin/indexer --all --config /etc/sphinx/sphinx.conf [dropbox link]. Running /usr/bin/searchd --config /etc/sphinx/sphinx.conf produced a "Segmentation fault (core dumped)" error.

    I searched around on this forum and elsewhere, to no avail. Any clues much appreciated!

  • peregrineperegrine MVP
    edited October 2014

    Both indexer and searchd failed to start up. Here's the error from calling /usr/bin/indexer --all --config /etc/sphinx/sphinx.conf [dropbox link]. Running /usr/bin/searchd --config /etc/sphinx/sphinx.conf produced a "Segmentation fault (core dumped)" error.

    Segementation fault - means your program is trying to access memory it shouldn't.

    like I said you may want to compile it yourself from source.

    http://vanillaforums.org/discussion/27177/tutorial-manually-installing-sphinxsearch-from-source-via-make-and-configure

    then run a basic test as explained in sphinx documentation on sphinx site,

    http://sphinxsearch.com/docs/2.2.4/quick-tour.html

    any errors with basic test? with original sphinx.conf.

    you don't need to add anything to the conf - the sphinx plugin builds the proper conf file. (provided the data folder is there in your distribution sphinx.conf).

    you should test the original sphinx.conf from your distribution (just make sure it has data in path name.) again a simple sphinx test on the sphinx site documentation.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited October 2014

    also check here:

    http://sphinxsearch.com/forum/view.html?id=855

    and post on sphinxsearch.com

    if you still get segmentation faults with basic test.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • mcu_hqmcu_hq ✭✭✭

    wow, awesome job @peregrine‌ . Yea, the default sphinx places a folder called, "data", for the indexes which the plugin needs. It is probably an oversight to always look for that word since some people may custom edit the paths. I haven't looked at sphinx in a while...the default paths may have changed.

Sign In or Register to comment.