sphinxsearch pid文件为空,netstat报告没有

时间:2011-12-20 03:55:32

标签: ubuntu sphinx ubuntu-10.04

在Ubuntu 10.04上安装了SphinxSearch。

每次启动时,pid文件(/var/run/searchd.pid)都是空白文件。我可以重启服务几秒钟,然后我得到'restart:Unknown instance:'

此外,SphinxSearch不会出现在'netstat |下grep 9312'。

以下是我的配置文件的搜索部分。

searchd
{
   listen = 9312
   log = /var/log/sphinxsearch/searchd.log
   query_log = /var/log/sphinxsearch/log/query.log
   read_timeout = 5
   max_children = 30
   pid_file = /var/run/searchd.pid
   max_matches = 1000
   seamless_rotate = 1
   preopen_indexes = 0
   unlink_old = 1
}

和/etc/init/sphinxsearch.conf看起来像

# SphinxSearch Service

description     "SphinxSearch Daemon"
author          "Andrey Aksyonoff <shodan@sphinxsearch.com>"

start on (net-device-up
          and local-filesystems
          and runlevel [2345])
stop on runlevel [016]

respawn
respawn limit 10 35

# The default of 5 seconds is too low if we have rt indices and have to flush them
kill timeout 30

env DEFAULTFILE="/etc/default/sphinxsearch"
pre-start script
    if [ -f "$DEFAULTFILE" ]; then
        . "$DEFAULTFILE"
    fi
    if [ "z$START" != "zyes" ]; then
        stop
        logger "To enable sphinxsearch, edit /etc/default/sphinxsearch and set START=yes"
        exit 0
    fi
    if [ ! -f /etc/sphinxsearch/sphinx.conf ]; then
        logger "Please create an /etc/sphinxsearch/sphinx.conf configuration file."
        logger "Templates are in the /etc/sphinxsearch/ directory."
        exit 0
    fi
end script

exec /usr/bin/searchd --nodetach

1 个答案:

答案 0 :(得分:2)

经过一些搜索后,这个问题只是由日志文件的无效路径引起的。没有任何报道说无法访问日志......