我需要为Mailpiler安装sphinxsearch。 当我尝试运行它时,我得到了:
root@78c3f1ee01ed:/var/log# /etc/init.d/sphinxsearch start
Starting sphinxsearch: Sphinx 2.0.4-id64-release (r3135)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinxsearch/sphinx.conf'...
listening on 127.0.0.1:9312
listening on 127.0.0.1:9306
precaching index 'main1'
precaching index 'main2'
precaching index 'main3'
precaching index 'main4'
precaching index 'dailydelta1'
precaching index 'delta1'
precaching index 'tag1'
precaching index 'note1'
precached 8 indexes in 0.003 sec
ERROR.
日志为空。
root@78c3f1ee01ed:/var/log# ls -al sphinxsearch/
total 8
drwxrwxrwx 2 sphinxsearch root 4096 Oct 21 2013 .
drwxrwxr-x 11 root syslog 4096 Dec 1 11:07 ..
女巫tail -f /var/log/searchd.log &
:
root@78c3f1ee01ed:/var/log# /etc/init.d/sphinxsearch start
Starting sphinxsearch: Sphinx 2.0.4-id64-release (r3135)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinxsearch/sphinx.conf'...
listening on 127.0.0.1:9312
listening on 127.0.0.1:9306
precaching index 'main1'
precaching index 'main2'
precaching index 'main3'
precaching index 'main4'
precaching index 'dailydelta1'
precaching index 'delta1'
precaching index 'tag1'
precaching index 'note1'
precached 8 indexes in 0.003 sec
ERROR.
root@78c3f1ee01ed:/var/log# [Mon Dec 1 14:47:38.219 2014] [ 920] Child process 921 has been forked
[Mon Dec 1 14:47:38.219 2014] [ 921] listening on 127.0.0.1:9312
[Mon Dec 1 14:47:38.219 2014] [ 921] listening on 127.0.0.1:9306
[Mon Dec 1 14:47:38.223 2014] [ 921] binlog: replaying log /var/data/binlog/binlog.001
[Mon Dec 1 14:47:38.223 2014] [ 921] binlog: replay stats: 0 rows in 0 commits; 0 updates; 0 indexes
[Mon Dec 1 14:47:38.223 2014] [ 921] binlog: finished replaying /var/data/binlog/binlog.001; 0.0 MB in 0.000 sec
[Mon Dec 1 14:47:38.223 2014] [ 921] binlog: finished replaying total 1 in 0.000 sec
[Mon Dec 1 14:47:38.223 2014] [ 921] accepting connections
看起来它正在运行,但仍然输出错误。
答案 0 :(得分:2)
在/etc/init.d/sphinxsearch at start bash run function running
start)
echo -n "Starting $DESC: "
do_start
[ -n "$STARTDELAY" ] && sleep $STARTDELAY
if running ; then
echo "$NAME."
else
echo " ERROR."
fi
;;
正在寻找PIDFILE。
running()
{
# Check if the process is running looking at /proc
# (works for all users)
# No pidfile, probably no daemon present
[ ! -f "$PIDFILE" ] && return 1
# Obtain the pid and check it against the binary name
pid=`cat $PIDFILE`
running_pid $pid $DAEMON || return 1
return 0
}
默认PIDFILE在/ var / run / sphinhsearch
中设置PIDFILE=/var/run/sphinxsearch/searchd.pid
但在我的配置文件“using config file '/etc/sphinxsearch/sphinx.conf'...
”中,PID已保存为“pid_file = /var/run/piler/searchd.pid
”
更改PID位置“PIDFILE=/var/run/piler/searchd.pid
”后,一切正常。
Starting sphinxsearch: Sphinx 2.0.4-id64-release (r3135)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinxsearch/sphinx.conf'...
listening on 127.0.0.1:9312
listening on 127.0.0.1:9306
precaching index 'main1'
precaching index 'main2'
precaching index 'main3'
precaching index 'main4'
precaching index 'dailydelta1'
precaching index 'delta1'
precaching index 'tag1'
precaching index 'note1'
precached 8 indexes in 0.003 sec
sphinxsearch.
答案 1 :(得分:0)
那'错误'似乎不是来自狮身人面像。找不到任何情况下sphinx只输出一个平淡的错误,它至少试图解释。检查init脚本的来源可能会有一个线索。
虽然已经说过,我从经验中知道,当'binlog_path'设置不正确时,sphinx不喜欢。它倾向于毫不客气地死亡,没有任何消息(但是日志仍然显示服务器在它死之前启动)。
检查sphinx.conf中定义的文件夹1)2)作为文件夹存在,3)sphinxsearch用户可写。