1

I check this topic: Sphinx error: unknown local index "INDEX_NAME" in search request , but it's closed and it's not resolve problem in my rails application.

I update TS to 3.0.2, and include it to deploy.rb. I also change code in model. Now it works in development, and some examples work in test, and some not. But after successful deployment I get error:

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

I try rebuild, restart, and other things, but it doesn't work :(

Can anybody help me?

Thanks!

Community
  • 1
  • 1
mike90
  • 198
  • 1
  • 8
  • by TC do you mean TS (Thinking Sphinx)? And there's no 3.0.4 release of that yet... – pat Jun 03 '13 at 08:24
  • Also: what's the output when you run rebuild? – pat Jun 03 '13 at 08:24
  • I am so sorry, it is of course Thinking Sphinx in version 3.0.2 In production (RAILS_ENV=production rake ts:rebuild) it return (last two line): Failed to start searchd daemon. Check /home/michal/coach-app/releases/20130602185224/log/production.searchd.log. Failed to start searchd. Check the log files for more information. – mike90 Jun 03 '13 at 11:09
  • What version of Sphinx do you have installed in production? – pat Jun 03 '13 at 12:09
  • Sphinx 2.0.5-id64-release (r3308) – mike90 Jun 03 '13 at 18:36

1 Answers1

3

It looks like there's already a Sphinx daemon running that Thinking Sphinx hasn't stopped (if you're still getting the same error) so I'd recommend killing that rogue searchd process (which you should be able to find via ps aux | grep searchd - and, if the permissions are fine, killall searchd will stop that Sphinx process).

pat
  • 16,116
  • 5
  • 40
  • 46
  • How is it not working? Is there a process there and you can't kill it? Is there no process? What's the output when you run the following: `searchd --pidfile --config /home/michal/coach-app/current/config/production.sphinx.conf` – pat Jun 04 '13 at 02:12
  • No, I killed and still don't work. Sphinx 2.0.5-id64-release (r3308) Copyright (c) 2001-2012, Andrew Aksyonoff Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com) using config file '/home/michal/coach-app/current/config/production.sphinx.conf'... WARNING: compat_sphinxql_magics=1 is deprecated; please update your application and config listening on 127.0.0.1:9306 bind() failed on 127.0.0.1, retrying... bind() failed on 127.0.0.1, retrying... – mike90 Jun 04 '13 at 10:02
  • It's indicating that Sphinx (or something else) is running on port 9306 already - are you sure you killed the process? – pat Jun 04 '13 at 13:36
  • I killed by "killall searchd", but it creates new process with searchd. – mike90 Jun 05 '13 at 10:54
  • Automatically? Or when you run rebuild? Rebuild is supposed to start it again. If you're seeing that 'bind failed' error and rebuild is the process starting the first daemon, then perhaps you're manually requiring the thinking_sphinx tasks in your Rakefile? That's not necessary with Rails 3. – pat Jun 06 '13 at 01:16
  • One more time. I did deploy (instruction in TS page), next I get error, so I go by ssh to server and try to rebuild manualy (I don't think it's good idea). It doesn't work so I tried kill searchid and it also doesn't work. I've got Rails 3.2.11 and thinking sphinx 3.0.2. – mike90 Jun 06 '13 at 14:24
  • Maybe this answer didn't help the OP but it helped me track down an issue in my local environment. I had started `sphinx` from a different application, so running `rake ts:start` failed. Killing the rouge `searchd` process solved my problem. – Andrew Feb 10 '14 at 20:05