prevent start multiple suporvisor

I am using supervisor to monitor some program.
today, I login my vps and see

shadowsocks                      FATAL     Exited too quickly (process log may have details)

take a look at error log:

2015-05-15 23:54:53 INFO     starting server at xxx.xxx.xxx.xxx:8382
Traceback (most recent call last):
  File "/usr/local/bin/ssserver", line 9, in <module>
    load_entry_point('shadowsocks==2.6.1', 'console_scripts', 'ssserver')()
  File "/usr/local/lib/python2.7/dist-packages/shadowsocks/server.py", line 70, in main
    tcp_servers.append(tcprelay.TCPRelay(a_config, dns_resolver, False))
  File "/usr/local/lib/python2.7/dist-packages/shadowsocks/tcprelay.py", line 576, in __init__
    server_socket.bind(sa)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use

But shadowsocks actually is working very well.

Then I find that:

(venv)root@default:/data/www/walbk# ps -e |grep 'super'
18654 ?        00:01:01 supervisord
32132 ?        00:00:10 supervisord
32483 pts/0    00:00:00 supervisorctl
32496 pts/0    00:00:00 supervisorctl
32539 pts/0    00:00:00 supervisorctl
32574 pts/0    00:00:00 supervisorctl

I don’t know what result in this situation, but I think supervisord should not start twice.

Everytime I type supervisorctl -c /mithril/etc/supervisord.conf, seems enter a later started supervisorctl, so it can not monitor shadowsocks.
What should I do to solve this problem?

update

I terminate 32132 ? 00:00:10 supervisord
but

(venv)root@default:/data/www/walbk# supervisorctl -c /mithril/etc/supervisord.conf
unix:///tmp/supervisor.sock no such file
supervisor>
[10]+  Stopped                 supervisorctl -c /mithril/etc/supervisord.conf
(venv)root@default:/data/www/walbk# ps -e|grep 'supervisord'
18654 ?        00:01:01 supervisord
(venv)root@default:/data/www/walbk#

I can not use supervisorctl,unix:///tmp/supervisor.sock no such file seems saying supervisord is not running.
But it is running very well in fact…


Source: ubuntu

Leave a Reply