2015-12-10 23 views
2

我在我的debian Wheezy服务器上运行sphinx搜索时遇到问题。狮身人面像搜索不会停止也不会正确更新

目前,有运行

[email protected]:~# 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 

第一个问题 2个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与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 /本地/ sphinx/var/log/searchd/,仍然不起作用。

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

编辑(答案@aeryaguzov评论)

[email protected]:~# sudo cat /usr/local/sphinx/var/log/searchd/searchd.pid 
[email protected]:~# 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 
+0

问题出在你的pid文件上,所以** cat /usr/local/sphinx/var/log/searchd/searchd.pid**并检查** ps aux | grep searchd ** – aeryaguzov

+0

@aeryaguzov我刚刚编辑我的问题。我用sudo nano也检查过searchd.pid,它是空的。 – Kalzem

回答

2

好吧,似乎对一些原因不明的searchd.pid人受到searchd的创建(正在运行)。所以我决定删除search.pid并且search99。然后我重新索引并开始搜索,没有任何问题。

+0

杀了searchd和reindex工作 – MontrealDevOne