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.
Sphinx Plugin Cron Job Errors
meshugy
✭✭
Hello,
I followed the instructions included with this plugin and setup three cron job (main, delta, and stats.) They are running several times a day, but when I look at the log it's showing these errors for every attempt:
WARNING: failed to open pid_file '/var/log/searchd.pid'. WARNING: indices NOT rotated.
Any idea what I can do to avoid these errors? As it stands, they are preventing the indexer from running. I can get it to work manually, but I'd prefer to have the cron jobs automating this task.
The FAQ with the plugin mentions turning off searchd if these errors occur. I can do that when manually running the indecer, but how do you do that with a cron job?
Thanks!
Michael
0
Comments
I suspect it may have to do with permissions. Since it works fine when you manually do it, can you verify that the cron job is running with root privleldges or at least the same user level as when you manually index? For sanity, also check that the cron file has the right locations of the pid file.
Ok, I set the cron jobs to run as sudo and it seems to be working now. Here is what my log file looks like now. Does this look correct?
Only the Delta and Stats have been indexed so far...the Main won't be attempted till tonight.
Looks about right. Best way to tell is to create new content and then let cron run. Search for the new material after cron ran to see if it got indexed.
It seems to be running the cron files correctly, but when I search for new content it's not indexed. So somehow it's still not indexing correctly. If I manually use the command
It indexes everything properly and everything is searchable right away. Any ideas what may be preventing the cron from working correctly?
Here is my latest log file:
That Looks alright to me. If you compare the cron output to the manual method output, are there any differences?
@mcu_hq there is no entry in the sphinx cron log when I just run the indexer manually.
OK, i figured it out. The path to the vss files was not set correctly in the sphinx.conf file. For example, the path to the vss_main was set as
For the cron file to work, it had to be set to:
I set the vss_delta and vss_stats the same way and now everything is getting indexed via the cron file.
Ahhhhh. Thanks for tracking it down. That should have been replaced by the installer. I'll upload a fix on github!
My pleasure, thanks for the awsome plugin!