Supervisor on Debian Wheezy: another program is already listening on a port that one of our HTTP servers is configured to use [closed]
When I run service supervisor start
I run into the following error:
Starting supervisor: 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/bin/supervisord -h
Content of /var/log/superuser/supervisord.log:
2014-08-04 16:25:45,891 CRIT Supervisor running as root (no user in config file)
2014-08-04 16:25:45,891 WARN Included extra file "/etc/supervisor/conf.d/com.domain.subdomain.conf" during parsing
Good-to-know-stuff:
- I use Debian Wheezy on a Digital Ocean server.
- I have tried to check the ports supervisor uses in a clean Vagrant box with the same specs, but I have got the same errors.
How could I check which port is the source of this error?
Solution 1:
I solved my problem by unlinking the .sock
file.
sudo unlink /var/run/supervisor.sock
If this does not help you should check and unlink the file at /tmp/supervisor.sock
.
Solution 2:
Type this in your terminal
ps -ef | grep supervisord
You will get some pid of supervisord just like these
root 2503 1 0 Nov19 ? 00:03:23 /usr/bin/python /usr/bin/supervisord
root 21337 2556 0 18:15 pts/8 00:00:00 grep --color=auto supervisord
And the PID is 2503
Then type this:
kill -s SIGTERM 2503
It should work
Solution 3:
Similar to @N'falyKaba's answer but perhaps a bit more direct, as of newer versions of Supervisor you can use supervisorctl pid
to get the pid, kill it, and restart:
$ kill -s SIGTERM $(supervisorctl pid)
To restart:
$ supervisord -c /path/to/supervisord.conf
Source: docs.