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

时间:2015-12-10 13:36:59

标签: command-line debian sphinx

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

目前,有2个搜索端口正在运行

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

1 个答案:

答案 0 :(得分:3)

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