【问题标题】:Thinking sphinx 3 and sphinx 2.1.1-beta not startThinking sphinx 3 和 sphinx 2.1.1-beta 无法启动
【发布时间】:2024-01-02 18:11:01
【问题描述】:

我在 Rails 3 应用程序和新的 sphinx 2.1.1-beta 上安装 Thinking sphinx 3,在此之前我有 思考 sphinx 2 和 sphinx 2.1.1-beta,它们在 sphinx.yml 中添加 port: 3312 可以正常工作

但是现在当我在thinking_sphinx.yml 中添加port: 3312 时,我得到了结果

rake ts:start

Failed to start searchd daemon. Check myapp/log/development.searchd.log.

Failed to start searchd. Check the log files for more information.

development.searchd.log.

[Wed May 15 12:17:34.010 2013] [ 2480] binlog: replaying log /myapp/tmp/binlog/development/binlog.001

[Wed May 15 12:17:34.010 2013] [ 2480] binlog: replay stats: 0 rows in 0 commits; 0 updates; 0 indexes

[Wed May 15 12:17:34.010 2013] [ 2480] binlog: finished replaying /myapp/tmp/binlog/development/binlog.001; 0.0 MB in 0.000 sec

[Wed May 15 12:17:34.011 2013] [ 2480] binlog: finished replaying total 10 in 0.001 sec

[Wed May 15 12:17:34.012 2013] [ 2480] FATAL: listen() failed: Address already in use

[Wed May 15 12:17:34.455 2013] [ 2480] shutdown complete

[Wed May 15 12:17:34.469 2013] [ 2479] Child process 2480 has been finished, exit code   1. Watchdog finishes also. Good bye!

当我删除thinking_sphinx.yml 中的port: 3312 我得到

development.searchd.log.

[Wed May 15 12:23:44.040 2013] [ 2527] Child process 2528 has been forked

[Wed May 15 12:23:44.389 2013] [ 2528] listening on 127.0.0.1:9306

[Wed May 15 12:23:44.390 2013] [ 2528] bind() failed on 127.0.0.1, retrying...

[Wed May 15 12:24:20.446 2013] [ 2528] FATAL: bind() failed on 127.0.0.1: Address already in use

[Wed May 15 12:24:20.478 2013] [ 2527] Child process 2528 has been finished, exit code 1. Watchdog finishes also. Good bye!

【问题讨论】:

  • 我有类似的问题,并通过删除现有的 searchd 进程解决了它。 (运行ps aux | grep searchdkill -9 [process_id]

标签: sphinx thinking-sphinx


【解决方案1】:

port 设置现在是mysql41(因为 TS v3 使用 Sphinx 的 Mysql41 协议而不是旧的二进制协议)。将其更改为,确保您没有运行任何旧的 searchd 进程,这应该可以解决问题。

【讨论】:

  • WTF?为什么 port 现在命名为 mysql41 ?在更新 ThinkingSphinx 之后,我总是遇到错误 Failed to start searchdbind() failed on 127.0.0.1, retrying...,直到我注意到重命名。今天花了我一个小时>:(
  • 现有的 port 设置与 Sphinx 的旧二进制协议相关联。我意识到mysql41 的名字肯定不明显(如果我有机会回去做不同的事情,我可能会叫它别的名字),但我不想删除设置二进制文件的选项港口也是。毕竟,Sphinx 可以同时运行这两种协议。
  • 另外:阅读升级文档可能值得一读 - 这是其中涵盖的内容,可能还有其他您不知道的更改:freelancing-gods.com/thinking-sphinx/upgrading.html
最近更新 更多