Supervisor: Supervisor process refusing commands from supervisorctl

Created on 14 Jul 2014  路  7Comments  路  Source: Supervisor/supervisor

$ supervisorctl restart celeryd http://localhost:9001 refused connection

But it looks like the process is still running:

$ ps aux | grep "supervisord" ubuntu 1444 0.2 0.4 58920 10088 ? Ss 14:53 0:32 /usr/bin/python /usr/local/bin/supervisord

So I kill that process (1444). After verifying that the process is no longer running, I try to restart supervisord:

$ supervisord Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting supervisord. For help, use /usr/local/bin/supervisord -h

Has anyone encountered this problem before?

Most helpful comment

I have this error too.
Solution:
make symbolic link conf file. New version supervisor try search in /etc.

ln -s /etc/supervisor/supervisord.conf /etc/supervisord.conf

All 7 comments

Relevant supervisord.conf lines:

[unix_http_server]
file=/tmp/supervisor.sock

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock


command=/usr/local/bin/celery -A tasks -l INFO worker -c 25 --maxtasksperchild 1 --beat
user=ubuntu
autostart=true
autorestart=true

Somehow your invocation of supervisorctl is finding a supervisord.conf file that has localhost:9001 as the server address, but your supervisord is not listening on that TCP port. I'd suggest trying supervisorctl -c /explicit/path/to/supervisord.conf and supervisord -c /explicit/path/to/supervisord.conf to prevent both supervisord and supervisorctl from guessing a path.

To expand on what @mcdonc said, if -c is not used to specify a path to the config file, then supervisorctl or supervisord will search for the file (see the code or this manual page). You can look for supervisord.conf files in those places to troubleshoot it.

I'm going to close this because it looks more like a question about using Supervisor rather than a bug. We encourage using the mailing list for questions. If the above suggestions don't help and you think you've found a bug, we can reopen this issue.

I have this error too.
Solution:
make symbolic link conf file. New version supervisor try search in /etc.

ln -s /etc/supervisor/supervisord.conf /etc/supervisord.conf

@WorldException's fix (adding a symlink) worked for me too. Are newer supervisor versions looking in /etc/supervisord.conf rather than /etc/supervisor/supervisord.conf?

Are newer supervisor versions looking in /etc/supervisord.conf rather than /etc/supervisor/supervisord.conf?

As of Supervisor 3.2.0 (current stable version), no version of Supervisor has ever searched for the config file /etc/supervisor/supervisord.conf.

However, some distributions have packaged Supervisor for installation with a system package manager (e.g. apt-get). These packages are not created by the Supervisor project itself and often include patches that modify Supervisor. As noted in configuration, some distribution packages have been seen where Supervisor has been modified to search in /etc/supervisor/supervisord.conf.

The confusion occurs when changing from a distribution package (apt-get install supervisor) to the official PyPI package (pip install supervisor).

Interesting... I've been using the Debian supervisor package. Perhaps they changed some of their patches. I guess I should blame the Debian package maintainers instead. Thanks! :stuck_out_tongue:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gregpinero picture gregpinero  路  29Comments

jvanasco picture jvanasco  路  46Comments

mminer picture mminer  路  41Comments

jbrehm picture jbrehm  路  64Comments

timonwong picture timonwong  路  49Comments