gpt4 book ai didi

centos - Sphinx 当 Restart/Stop searchd.pid 被删除时

转载 作者:太空宇宙 更新时间:2023-11-03 17:15:54 25 4
gpt4 key购买 nike

我只是在Centos7.3上安装了Sphinx版本sphinx-2.2.11-1.rhel7.x86_64

所以我成功地安装了它并为数据库建立了索引,当我第一次启动它时,Sphinx 正在启动,但是当我尝试使用 service searchd stop 或 service searchd restart 每次 searchd.pid 被自动删除但再也没有创建时,所以由于错误,sphinx 无法再次启动

[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.

关于我如何解决这个问题的任何建议,我已经尝试了几天以找到一种方法,但仍然没有运气......

最佳答案

我遇到了同样的问题。根本原因是由于以下文件夹中的元数据不正确,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

关于centos - Sphinx 当 Restart/Stop searchd.pid 被删除时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44965272/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com