sphinx on centos 7 cant started because of searchd.pid absent
Asked Answered
R

3

5

I 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

Installation went without any errors and then I created sphinx config and installed php extension (also all without error)

I restart apache (httpd) and I tried to START sphinx service

systemctl start searchd

I got this message

Job for searchd.service failed because a configured resource limit was > exceeded. See "systemctl status searchd.service" and "journalctl -xe" for details.

after launch 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 Search Engine.

In fact I havn't "searchd.pid" anywhere at system though installation went good) How should I fix it ?

Thanks in advance

Recusancy answered 2/5, 2017 at 17:35 Comment(1)
just to clarify, your title, ends up being wrong. It didnt start sphinx, therefore no pid created. The pid was missing because sphinx didnt start (not that it failed because of pid). ie, sphinx didnt start, (causing searchd.pid to be absent) :)Flopeared
R
5

I have just resolved this issue.

I took a look at sphinx log /var/log/sphinx/searchd.log and noted that some data files under folder /var/log/sphinx/data/ are Permission denied;

I set chown sphinx:sphinx on /var/log/sphinx/data/ folder and It started to work as charm )

Thanks

Recusancy answered 2/5, 2017 at 19:20 Comment(0)
T
1

Same symptom with a slightly different cause... /var/log/sphinx/searchd.log shows

FATAL: failed to open '/var/data/binlog.lock': 13 'Permission denied'

Fixed by adding binlog_path = to the searchd section of sphinx.conf. Empty path disables binary logging which by default tries to open files in /var/data owned by root. Alternatively, you can supply a valid path writeable by sphinx.

Thanos answered 1/7, 2019 at 16:8 Comment(0)
P
1

The Sphinx search index is a database distributed over several files in the /var/lib/sphinx/ folder. Those file names start with the doc prefix which is the index name as configured in /etc/sphinx/sphinx.conf.

The searchd service also stores the binlog files in that folder to be able to restore the Sphinx functionality in case of the system crash. If you cannot start the searchd service because it cannot create a binlog file, try to move or delete all binlog.* files from this folder and then start the service.

Permanence answered 29/8, 2019 at 12:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.