Sphinx on centos 7 not working because searchd.pid is missing
I have installed sphinx-2.2.11 on my CentOS 7
yum install -y postgresql-libs unixODBC wget
http://sphinxsearch.com/files/sphinx-2.2.11-1.rhel7.x86_64.rpm yum
install sphinx-2.2.11-1.rhel7.x86_64.rpm
The installation went without any errors and then I created the sphinx config and installed the php extension (also all without errors)
I restart apache (httpd) and I tried to start the sphinx service
systemctl start searchd
I received this message
The job for searchd.service failed because the resource limit was exceeded. See "Systemctl status searchd.service" and "journalctl -xe" for details.
after running the command - systemctl status searchd.service
May 02 20:28:57 kvmde43-10657.fornex.org systemd [1]: Failed to read PID from file /var/run/sphinx/searchd.pid: Invalid argument May 02 20:28:57 kvmde43-10657.fornex .org systemd [1]: Failed to start SphinxSearch.
I didn't actually search for "searchd.pid" anywhere on the system, although the installation went well). How should I fix it?
Thank you in advance
source to share
I just solved this problem.
I took a look at the sphinx log / var / log / sphinx / searchd.log and noted that some of the data files in the / var / log / sphinx / data / folder are Permission denied;
I installed chown
sphinx: sphinx on / var / log / sphinx / data / folder and started working like a spell)
thank
source to share
Same symptom with slightly different reason ... /var/log/sphinx/searchd.log shows
FATAL: failed to open '/var/data/binlog.lock': 13 'Permission denied'
Fixed by adding binlog_path =
to searchd
the sphinx.conf section. An empty path disables binary logging, which by default tries to open files in / var / data owned by the root user. Alternatively, you can specify the correct path to write with sphinx.
source to share
The Sphinx search index is a database spread over several files in the / var / lib / sphinx / folder. These filenames start with the doc prefix, which is the index name configured in /etc/sphinx/sphinx.conf.
The searchd service also stores binlog files in this folder so that it can restore Sphinx functionality in the event of a system crash. If you cannot start the searchd service because it cannot create the binlog file, try moving or deleting all binlog files. * From this folder and then start the service.
source to share