Thinking Sphinx Rake aborted, searchd is running while rebuilding or start/stop ts. Index works fine
Asked Answered
M

2

6

When I invoke rake ts:rebuild RAILS_ENV=production, I get the following:

(in /var/www/abc.com/public/abc/releases/20101008073517)
** Erubis 2.6.6
Stopped search daemon (pid 22531).
Generating Configuration to /var/www/abc.com/public/abc/releases/20101008073517/config/production.sphinx.conf
Sphinx 1.10-beta (r2420)
Copyright (c) 2001-2010, Andrew Aksyonoff
Copyright (c) 2008-2010, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/var/www/abc.com/public/abc/releases/20101008073517/config/production.sphinx.conf'...
indexing index 'spot_core'...
collected 6 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 6 docs, 4622 bytes
total 0.016 sec, 278316 bytes/sec, 361.29 docs/sec
skipping non-plain index 'spot'...
indexing index 'trip_core'...
collected 3 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 3 docs, 52 bytes
total 0.004 sec, 11326 bytes/sec, 653.45 docs/sec
skipping non-plain index 'trip'...
total 12 reads, 0.000 sec, 6.9 kb/call avg, 0.0 msec/call avg
total 24 writes, 0.000 sec, 7.8 kb/call avg, 0.0 msec/call avg
rake aborted!
searchd is already running.

(See full trace by running task with --trace)

Whenever I try to start/stop, it always says

rake aborted!
searchd is already running.

Even when I manually stop the searchd and run again, it still says the same:

searchd --config /path/to/app/current/config/production.sphinx.conf--stop
Moa answered 28/10, 2010 at 8:23 Comment(0)
M
8

Managed to stop searchd with the command sudo!!! Then re-run rebuild, everything is fine now.

sudo searchd --stop
Moa answered 28/10, 2010 at 9:41 Comment(1)
Can you elaborate on stopping searchd with sudo? I am having the same problem with thinking_sphinx but can't figure it out! Thanks!Oration
P
5

Your task may be running twice.

Have a look in your Rakefile. Do you have the line:

require 'thinking_sphinx/tasks'

If so remove it. Rails 3.x with Thinking Sphinx 2.x does not need it.

Check this: https://github.com/freelancing-god/thinking-sphinx/issues/207

Parakeet answered 28/7, 2011 at 21:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.