Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
tekguru Posted June 14, 2015 Posted June 14, 2015 Okay some 'newbie' help needed here with getting sphinx working. My host has installed sphinx on the server, but we seem to have two instances of it running:580(searchd)/usr/bin/searchd/usr/local/etc/usr/bin/searchd --config /etc/sphinx/sphinx.conf581(searchd)/usr/bin/searchd/usr/local/etc/usr/bin/searchd --config /etc/sphinx/sphinx.confand my host has commented:Unfortunately, since it is 3rd-party software, I am not familiar with sphinx at all. I can simply tell you what I see and implement any changes you specify, but there is little I can do to troubleshoot this for you.I see two configuration files for sphinx:# ls -al /usr/local/etc/sphinx.conf /etc/sphinx/sphinx.conf-rw-r--r-- 1 root root 1165 Jul 26 2013 /etc/sphinx/sphinx.conf-rw-r--r-- 1 root root 1145 Jun 14 14:15 /usr/local/etc/sphinx.confI see the dual process for sphinx as well; however, I'm not even sure how to stop/restart sphinx.So we need to know how to stop both instances, and how to restart it preferably with it looking in the '/public_html/sphinx_conf/' folder for the sphinx.conf file so that I can alter it myself.Q's: So how does my host stop / start it and how do we set / reconfigure the location of the config file?I have looked on the sphinx web site and unless I'm going mad I can't find answers to those questions. Dead in the water until some kind soul can advise.
nylyon Posted June 14, 2015 Posted June 14, 2015 I think that having the two searchd's running is normal. I just checked my server and have 2 as well. When you implement Sphinx in IPB, you will need to install the sphinx.conf file somewhere on your system. I have mine in my forum root directory. From there stop sphinx: searchd --stop and start it using the proper config file downloaded from your ACP: searchd --config /path/to/your/sphinx.confThen rebuild your index and should be set.
tekguru Posted June 15, 2015 Author Posted June 15, 2015 Yeah two may be likely but are your pointing at two different shpinx.conf files like that?Thanks for the info on stopping, starting!
tekguru Posted June 15, 2015 Author Posted June 15, 2015 Ref rebuilding the index, one we have Sphinx operational and IP.Board IPS4 happy with it does it not rebuild the index automatically? Or is there a task that needs triggering?
nylyon Posted June 15, 2015 Posted June 15, 2015 Yeah two may be likely but are your pointing at two different shpinx.conf files like that?Thanks for the info on stopping, starting!Nope, pointing to just one like yours (first example) After installing Sphinx at the OS layer, in the ACP enable it, download the config file, start Sphinx using that config then you have to initially build the index. Once the index is built, you shouldn't need to build it again or have any other cron jobs like the 3.4 series installation. There is a bug which should be fixed with 4.0.8 when the datastore gets cleared, you may need to rebuild your search. I have a patch on my site, and it's working perfectly!
tekguru Posted June 15, 2015 Author Posted June 15, 2015 Thanks, so are you issuing a command to start that initial index build, or is it automatic?I may pick your brains again later as I'm having trouble with my host getting Sphinx to work without them changing the configuration to one that IPS4 can't use.Which version of sphinx are you using?
nylyon Posted June 15, 2015 Posted June 15, 2015 The command to rebuild the index is a button in the ACP search screen. I am using Sphinx 2.2.9
tekguru Posted June 15, 2015 Author Posted June 15, 2015 Right, thanks. Makes sense. Same version I have. My config is as: searchd { listen = vps2.description.com:3312:mysql41 max_children = 30 pid_file = /var/sphinx/buildsearchd.pid preopen_indexes = 0 collation_server = utf8_general_ci workers = threads } index ips { type = rt path = /var/sphinx/index rt_field = index_title rt_field = index_content rt_field = index_tags rt_attr_bigint = index_object_id rt_attr_bigint = index_item_id rt_attr_bigint = index_container_id rt_attr_bigint = index_author rt_attr_bigint = index_views rt_attr_bigint = index_num_comments rt_attr_bigint = index_num_reviews rt_attr_json = index_permissions rt_attr_timestamp = index_date_created rt_attr_timestamp = index_date_updated rt_attr_string = index_class rt_attr_uint = index_class_id rt_attr_uint = index_hidden } Does that look okay to you, as ISP407 will still not accept it as working. In /var/lib/sphinx I have: drwxr-xr-x 2 sphinx sphinx 4096 Jun 15 06:14 ./drwxr-xr-x 24 root root 4096 Jun 14 12:18 ../-rw------- 1 root root 10 Jun 15 06:14 binlog.meta-rw------- 1 root root 4 Jun 15 06:14 index.kill-rw------- 1 root root 0 Jun 15 06:27 index.lock-rw------- 1 root root 794 Jun 15 06:14 index.meta-rw------- 1 root root 12 Jun 15 06:14 index.ram-rw------- 1 root root 1855 Jun 15 05:44 searchd.log-rw------- 1 sphinx sphinx 4 Jun 15 05:06 testrt.kill-rw------- 1 sphinx sphinx 0 Jun 15 04:24 testrt.lock-rw------- 1 root root 308 Jun 15 05:06 testrt.meta-rw------- 1 root root 12 Jun 15 05:06 testrt.ram In /var/sphinx: -rw------- 1 root root 0 Jun 15 08:00 buildsearchd.pid-rw------- 1 root root 0 Jun 15 08:00 index.lock In /var/run/sphinx -rw------- 1 sphinx sphinx 6 Jun 15 08:02 searchd.pid My host also advised: /var/sphinx/index/ did not exist so I have created it, changed its ownership to sphinx.sphinx, and restarted searchd. Yet every time I try to activate sphinx in ACP I get: Could not connect to the Sphinx server. Verify that the details provided are correct, that the correct configuration file was uploaded to the server and to the right location and that the Sphinx searchd application is running. If you need assistance, contact your hosting provider or server administrator. I think my host is getting tired of me asking them for details of what is where Any further ideas as this is driving me insane!
tekguru Posted June 15, 2015 Author Posted June 15, 2015 My host has advised one error:"WARNING: index 'test1': preload: failed to open /var/lib/sphinx/test1.sph: No such file or directory; NOT SERVING"
tekguru Posted June 15, 2015 Author Posted June 15, 2015 My hosts have just confirmed hey are using the wrong conf file. More to follow.
tekguru Posted June 15, 2015 Author Posted June 15, 2015 Change the host name to 127.0.0.1Only just saw this reply, now changed the updated file, and asking the host to try again. Fingers crossed!This is very much appreciated.
tekguru Posted June 15, 2015 Author Posted June 15, 2015 My host has switched the configuration file to /home/guru/public_html/sphinx_conf/sphinx.conf.use (correct file) and is getting this error:FATAL: failed to open log file 'searchd.log': Permission deniedThey have changed the ownership of both /var/log/sphinx/searchd.log and /var/lib/sphinx/searchd.log, but the error persistsSo approaching giving up on ever getting Sphinx working now....... Did you have any of these issues?
nylyon Posted June 15, 2015 Posted June 15, 2015 They will need to PD this issue to get it to start properly.
tekguru Posted June 15, 2015 Author Posted June 15, 2015 PD?This is sphinx that wont start on the server itself with the config file generated, or are you saying there is an issue with the config file itself that IPS4 is generating??
nylyon Posted June 15, 2015 Posted June 15, 2015 Problem Determination. If they're getting an error trying to open or write to a file, they'll need to determine what the issue is. I didn't have this issue, but then again I have been running Sphinx for years, so my logs and directories are all existing.
tekguru Posted June 15, 2015 Author Posted June 15, 2015 Right! My host has given up as permissions are good as far as they are concerned. We'll see if Invision manage to come up with anything.
tekguru Posted June 15, 2015 Author Posted June 15, 2015 Okay, can you advise in which location your searchd.log is saved as we're getting 'FATAL: failed to open log file 'searchd.log': Permission denied' error message?We've deleted all old incarnations of that file from when we used sphinx year ago and it still can't write the file so we're trying to work out where it wants to write to.
RevengeFNF Posted June 15, 2015 Posted June 15, 2015 If you don't know where the log file is, create a searchd.log file wherever you want, and then add this to the sphinx.conflog = /path/to/searchd.logSubstitute with the correct path.
tekguru Posted June 15, 2015 Author Posted June 15, 2015 Okay latest feedback from my host:The indexer program was located in /usr/bin instead of /usr/local/bin and resulted in an error:/usr/bin/indexer --config /home/xxx/public_html/sphinx_conf/sphinx.conf.use --allSphinx 2.2.9-id64-release (rel22-r5006)Copyright (c) 2001-2015, Andrew AksyonoffCopyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)using config file '/home/xxx/public_html/sphinx_conf/sphinx.conf.use'...FATAL: no indexes found in config file '/home/guru/public_html/sphinx_conf/sphinx.conf.use'The same is true of searchd:/usr/bin/searchd --config /home/xxx/public_html/sphinx_conf/sphinx.conf.use --allSphinx 2.2.9-id64-release (rel22-r5006)Copyright (c) 2001-2015, Andrew AksyonoffCopyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)FATAL: malformed or unknown option near '--all'; use '-h' or '--help' to see available options.The sphinx.conf.use file is:searchd { listen = 127.0.0.1:3312:mysql41 max_children = 30 pid_file = /var/sphinx/buildsearchd.pid preopen_indexes = 0 collation_server = utf8_general_ci workers = threads log = /var/log/sphinx/searchd.log } index ips { type = rt path = /var/sphinx/index rt_field = index_title rt_field = index_content rt_field = index_tags rt_attr_bigint = index_object_id rt_attr_bigint = index_item_id rt_attr_bigint = index_container_id rt_attr_bigint = index_author rt_attr_bigint = index_views rt_attr_bigint = index_num_comments rt_attr_bigint = index_num_reviews rt_attr_json = index_permissions rt_attr_timestamp = index_date_created rt_attr_timestamp = index_date_updated rt_attr_string = index_class rt_attr_uint = index_class_id rt_attr_uint = index_hidden }Any ideas why we are getting "FATAL: no indexes found in config file '/home/xxx/public_html/sphinx_conf/sphinx.conf.use'" as the index settings seem to be there?I assume the second error is due to the --all parameter being added for running?
RevengeFNF Posted June 15, 2015 Posted June 15, 2015 why sphinx.conf.use? Its only sphinx.confHe should also not use --all
tekguru Posted June 15, 2015 Author Posted June 15, 2015 On the first I've told them not to use the original file and to delete it and replace it with 'sphinx.conf.use', however they seem to want to leave it in place and use the 'sphinx.conf.use' file. The gods only know why.Should the '--all' not be used at all then either for the config setting or the running on the daemon??
RevengeFNF Posted June 15, 2015 Posted June 15, 2015 But the original file is sphinx.conf and not sphinx.conf.useI don't use --all and its working on my site.
tekguru Posted June 15, 2015 Author Posted June 15, 2015 Okay will force them to rename and try it. That is:/usr/bin/indexer --config /home/guru/public_html/sphinx_conf/sphinx.confand/usr/bin/searchd --config /home/guru/public_html/sphinx_conf/sphinx.conf
Recommended Posts
Archived
This topic is now archived and is closed to further replies.