我只是在Centos7.3上安装Sphinx版sphinx-2.2.11-1.rhel7.x86_64
所以我成功安装它并索引数据库,当我第一次启动它时,Sphinx启动但是当我尝试使用服务搜索停止或服务搜索重启每次searchd.pid被自动删除但从未再次创建所以由于错误
,狮身人面像无法重新开始[root@ns510209 log]# service searchd start
Redirecting to /bin/systemctl start searchd.service
Job for searchd.service failed because a configured resource limit was exceeded. See "systemctl status searchd.service" and "journalctl -xe" for details.
任何建议我如何解决这个问题我试着找几个方法但仍然没有运气......
答案 0 :(得分:2)
我遇到了同样的问题。根本原因是由于以下文件夹中的元数据不正确,searchd无法写入binlog文件:
# ls -al /var/lib/sphinx/
total 23580
drwxr-xr-x 2 sphinx sphinx 4096 Jul 9 16:52 .
drwxr-xr-x 33 root root 4096 Mar 12 14:18 ..
-rw------- 1 sphinx sphinx 8 Jul 9 16:47 binlog.001
-rw------- 1 sphinx sphinx 8 Jul 9 16:52 binlog.002
-rw------- 1 sphinx sphinx 0 Jul 9 16:52 binlog.lock
-rw------- 1 sphinx sphinx 12 Jul 9 16:52 binlog.meta
-rw------- 1 sphinx sphinx 0 Jun 21 18:53 doc.old.spl
-rw-r--r-- 1 sphinx sphinx 0 Jul 9 16:52 doc.spa
从此文件夹中移动除doc。*(或使用的任何前缀)以外的所有文件。然后启动服务:
# systemctl start searchd
# systemctl status searchd
● searchd.service - SphinxSearch Search Engine
Loaded: loaded (/usr/lib/systemd/system/searchd.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2019-07-09 16:52:43 MSK; 6min ago
Process: 1690 ExecStart=/usr/bin/searchd --config /etc/sphinx/sphinx.conf (code=exited, status=0/SUCCESS)
Process: 1687 ExecStartPre=/bin/chown sphinx.sphinx /var/run/sphinx (code=exited, status=0/SUCCESS)
Process: 1684 ExecStartPre=/bin/mkdir -p /var/run/sphinx (code=exited, status=0/SUCCESS)
Main PID: 1693 (searchd)
CGroup: /system.slice/searchd.service
├─1692 /usr/bin/searchd --config /etc/sphinx/sphinx.conf
└─1693 /usr/bin/searchd --config /etc/sphinx/sphinx.conf