Sphinx 搜索不会停止也不会正确更新

Sphinx search doesn't stop nor correctly update

我在我的 debian Wheezy 服务器上 运行 sphinx 搜索有问题。

目前有2个searchd端口运行

root@ns243216:~# netstat -tlpn | grep search
tcp        0      0 0.0.0.0:9306            0.0.0.0:*               LISTEN      11266/searchd
tcp        0      0 0.0.0.0:9312            0.0.0.0:*               LISTEN      11266/searchd

第一个问题 当我想执行这个

sudo /usr/bin/indexer -c /etc/sphinxsearch/sphinx.conf beta_jobs --rotate

它给了我这个:

Sphinx 2.2.10-id64-release (2c212e0)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinxsearch/sphinx.conf'...
indexing index 'beta_jobs'...
collected 6 docs, 0.0 MB
collected 0 attr values
sorted 0.0 Mvalues, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 6 docs, 867 bytes
total 0.046 sec, 18747 bytes/sec, 129.73 docs/sec
total 6 reads, 0.000 sec, 0.4 kb/call avg, 0.0 msec/call avg
total 12 writes, 0.000 sec, 0.9 kb/call avg, 0.0 msec/call avg
WARNING: failed to scanf pid from pid_file '/usr/local/sphinx/var/log/searchd/searchd.pid'.
WARNING: indices NOT rotated.

2 个我无法删除的警告...

第二个问题:当我想使用 searchd --stop 停止搜索时,它告诉我:

Sphinx 2.2.10-id64-release (2c212e0)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinxsearch/sphinx.conf'...
FATAL: stop: failed to read valid pid from '/usr/local/sphinx/var/log/searchd/searchd.pid'

我尝试将 chmod 755 设置为 /usr/local/sphinx/var/log/searchd/ 中的所有内容,但仍然无效。

我的sphinx.conf在这里Sphinx.conf on gist

编辑(对@aeryaguzov 评论的回答)

root@ns213646:~# sudo cat /usr/local/sphinx/var/log/searchd/searchd.pid
root@ns213646:~# ps aux | grep searchd
root     11265  0.0  0.0  79692  1228 ?        S    Nov30   0:00 /usr/bin/searchd
root     11266  0.1  0.0  91404  4696 ?        Sl   Nov30  26:54 /usr/bin/searchd
root     22783  0.0  0.0   8292   632 pts/1    S+   15:32   0:00 grep searchd

好吧,由于某些未知原因,searchd.pid 似乎是由 searchd(即 运行)创建的。所以我决定删除 search.pid 和 kill searchd。然后我重新编制索引并开始搜索,没有任何问题。