当更新sphinx searchd.pid文件丢失时,如何解决这个问题?

时间:2014-09-01 09:40:03

标签: indexing sphinx

我是狮身人面像的新手。重新启动服务器时,Sphinx在那里运行停止,我无法更新它:

>>root@server [~]# /usr/local/bin/indexer --config /usr/local/etc/sphinx.conf --rotate --all
  >> Sphinx 2.1.9-release (rel21-r4761)
  Copyright (c) 2001-2014, Andrew Aksyonoff
Copyright (c) 2008-2014, Sphinx Technologies Inc (http://sphinxsearch.com)

>>using config file '/usr/local/etc/sphinx.conf'...
indexing index 'mp3search'...
WARNING: Attribute count is 0: switching to none docinfo
collected 3382548 docs, 197.0 MB
WARNING: sort_hits: merge_block_size=132 kb too low, increasing mem_limit may improve performance
sorted 694.6 Mhits, 100.0% done
total 3382548 docs, 196994320 bytes
total 485.060 sec, 406123 bytes/sec, 6973.46 docs/sec
total 23971 reads, 25.528 sec, 131.3 kb/call avg, 1.0 msec/call avg
total 6982 writes, 36.447 sec, 953.1 kb/call avg, 5.2 msec/call avg
WARNING: failed to open pid_file '/home/local/public_html/sphinx/logs/searchd.pid'.
WARNING: indices NOT rotated.
缺少

searchd.pid文件,我该怎么办?

2 个答案:

答案 0 :(得分:1)

Sphinx服务在您的系统启动时无法启动。检查必须如何安装服务,具体取决于您的分发。通常,您应该在/etc/init.d中有一个searchd(或sphinxsearch文件,并且您需要将服务添加到运行级别(使用update-rc.d,chckconfig等取决于分发你可能有搜索的起始脚本,但由于某种原因,它无法开始搜索(尝试手动服务启动,如service searchd start,看看是否有效或是否有任何错误)。 Indexer为您提供有关pid文件的警告,因为此文件是由searchd创建的(手动开始搜索,您执行索引旋转)。

答案 1 :(得分:0)

在我使用Fedora 21的情况下,PIDFile中的/usr/lib/systemd/system/searchd.service设置与/etc/sphinx/sphinx.conf中设置的设置不同,因此搜索在启动时没有出现。感谢上面的提示。

相关问题