"searchd"显示“致命错误:在0.0.0.0上绑定失败:地址已在使用中”

4
当我尝试使用命令searchd时,它显示:
using config file '/usr/local/etc/sphinx.conf'...
WARNING: compat_sphinxql_magics=1 is deprecated; please update your application and config
listening on all interfaces, port=9312
bind() failed on 0.0.0.0, retrying...
bind() failed on 0.0.0.0, retrying...
bind() failed on 0.0.0.0, retrying...
bind() failed on 0.0.0.0, retrying...
bind() failed on 0.0.0.0, retrying...
bind() failed on 0.0.0.0, retrying...
bind() failed on 0.0.0.0, retrying...
bind() failed on 0.0.0.0, retrying...
bind() failed on 0.0.0.0, retrying...
bind() failed on 0.0.0.0, retrying...
bind() failed on 0.0.0.0, retrying...
bind() failed on 0.0.0.0, retrying...
FATAL: bind() failed on 0.0.0.0: Address already in use

当我执行netstat -nlp命令时,端口上已经有searchd服务。

  • 是否冲突?
  • 我该怎么办?

你是 searchd 的开发者吗? - Ben Voigt
2个回答

5

当我运行命令 ~# netstat -nlp 时,已经有一个名为"searchd"的端口在运行。

既然你已经有了运行中的searchd程序,那么你为什么还要尝试启动另外一个呢?

如果你真的想要运行两个实例(为什么要这样?),那么你需要将它们放在不同的端口上——每个实例都需要一个单独的配置文件。


是的,你说得对。但对我来说,我刚刚手动安装了“Sphinx”。但已经有一个实例在运行了。所以我感到很复杂。我应该删除那个实例还是怎么办? - 夏期劇場
2
也许尝试使用 "searchd --stop" 命令来停止正在运行的实例。如果失败,请尝试使用 "killall searchd" 命令来杀死所有实例。然后尝试正常启动。这假定您只针对一个实例,并且现有实例只是一个错误。 - barryhunter

0

可能您没有权限或直接访问地址0.0.0.0:9312,或者该地址已被其他进程占用。

尝试将Sphinx的searchd配置中的listen选项更改为另一个地址,或确保该地址可用。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接