3

When I try to start searchd, it gives the following error.

bind() failed on 0.0.0.0, retrying...

FATAL: bind() failed on 0.0.0.0: Illegal seek


I can find a searchd process running

root 14863 0.1 0.0 73884 3960 ? Ssl 23:21 0:00 /usr/bin/searchd --nodetach

Now, when i kill it or try to stop it (searchd --stop), it instantly restarts.

root 15841 0.5 0.0 73884 3960 ? Ssl 23:33 0:00 /usr/bin/searchd --nodetach


I am guessing there is some setting by which it automatically starts when the process is not running. How can I stop this from happening?

Kumar Deepak
  • 473
  • 4
  • 18
  • dmesg | tail gives this. *** [ 1733.055257] init: sphinxsearch main process (5743) killed by KILL signal [ 1733.055325] init: sphinxsearch main process ended, respawning *** There must be some setting for this. – Kumar Deepak Mar 23 '12 at 19:41

4 Answers4

7

By default, it seems like the debian package will start Sphinx with an additional keepalive process. I was able to stop it successfully with this;

sudo service sphinxsearch stop

Chris Henry
  • 11,914
  • 3
  • 30
  • 31
1

To my knowledge, Upstart is responsible for respawning searchd after you attempt to stop/kill it.

Since we know that this process is being managed by upstart, we can terminate the daemon using "stop sphinxsearch" and then start it again with "start sphinxsearch".

If you want to kill it normally like any other process, then you can remove the "--nodetach" argument in the config file /etc/sphinxsearch/sphinx.conf. However, by doing this, you can no longer stop the process using "stop sphinxsearch".

y_s
  • 138
  • 4
1

the 'init: ... main process ended, respawning' suggests there is something in the init script that sets a watchdog to make sure sphinx doesnt die.

Perhaps you need to shutdown sphinx via the init script itself

/etc/init.d/sphinxsearch stop
barryhunter
  • 20,886
  • 3
  • 30
  • 43
-1

No, there are no any sphinx option to restart Sphinx. Probably some monitoring tool like monit installed for Sphinx.

Iaroslav Vorozhko
  • 1,719
  • 14
  • 12