【问题标题】:Thinking Sphinx after deployment - ThinkingSphinx::SphinxError (unknown local index 'user_core' in search request):部署后思考 Sphinx - ThinkingSphinx::SphinxError(搜索请求中的未知本地索引“user_core”):
【发布时间】:2013-06-02 19:18:46
【问题描述】:

我检查了这个主题:Sphinx error: unknown local index "INDEX_NAME" in search request,但它已关闭,并且无法解决我的 rails 应用程序中的问题。

我将 TS 更新到 3.0.2,并将其包含在 deploy.rb 中。我还更改了模型中的代码。现在它在开发中工作,一些示例在测试中工作,而有些则不是。但成功部署后我得到错误:

ThinkingSphinx::SphinxError (unknown local index 'user_core' in search request):

我尝试重建、重新启动和其他操作,但它不起作用:(

谁能帮帮我?

谢谢!

【问题讨论】:

  • TC 是指 TS(Thinking Sphinx)吗?而且还没有 3.0.4 版本...
  • 另外:运行rebuild时的输出是什么?
  • 很抱歉,当然是 Thinking Sphinx 版本 3.0.2 在生产中 (RAILS_ENV=production rake ts:rebuild) 它返回(最后两行): 无法启动 searchd 守护进程。检查 /home/michal/coach-app/releases/20130602185224/log/production.searchd.log。开始搜索失败。查看日志文件以获取更多信息。
  • 您在生产环境中安装了哪个版本的 Sphinx?
  • Sphinx 2.0.5-id64-release (r3308)

标签: ruby ruby-on-rails-3 sphinx thinking-sphinx


【解决方案1】:

看起来已经有一个 Sphinx 守护进程正在运行,Thinking Sphinx 并没有停止(如果你仍然遇到同样的错误),所以我建议你杀死那个流氓 searchd 进程(你应该能够通过 @ 找到它987654322@ - 如果权限正常,killall searchd 将停止 Sphinx 进程。

【讨论】:

  • 怎么不工作了?那里有一个进程,你不能杀死它?没有流程吗?运行以下命令时的输出是什么:searchd --pidfile --config /home/michal/coach-app/current/config/production.sphinx.conf
  • 不,我杀了,还是不行。 Sphinx 2.0.5-id64-release (r3308) 版权所有 (c) 2001-2012, Andrew Aksyonoff 版权所有 (c) 2008-2012, Sphinx Technologies Inc (sphinxsearch.com) 使用配置文件 '/home/michal/coach-app/ current/config/production.sphinx.conf'... 警告:compat_sphinxql_magics=1 已弃用;请更新您的应用程序和配置监听 127.0.0.1:9306 bind() 在 127.0.0.1 上失败,重试... bind() 在 127.0.0.1 上失败,重试...
  • 这表明 Sphinx(或其他东西)已经在端口 9306 上运行 - 你确定你杀死了这个进程吗?
  • 我被“killall searchd”杀死了,但它使用searchd创建了新进程。
  • 自动?或者当你运行重建?重建应该重新启动它。如果您看到“绑定失败”错误并且重建是启动第一个守护进程的过程,那么也许您手动需要 Rakefile 中的 thinking_sphinx 任务?对于 Rails 3,这不是必需的。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多