I'm running Supervisord on my Ubuntu 14.04 server and everything works fine. I deploy using a git push and upon deployment I also need to restart my application server (gunicorn) which I can supposedly do using supervisorctl
.
In my supervisord.conf
, gunicorn is defined as follows:
[program:gunicorn]
command=/home/imb/imb/venv/bin/gunicorn --worker-class eventlet -b 127.0.0.1:5000 -w 1 app:app
directory=/home/imb/imb
autostart=true
autorestart=true
stdout_logfile=/tmp/gunicorn.log
redirect_stderr=true
stopsignal=QUIT
and I enabled supervisorctl
like this:
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
I started supervisor using:
sudo supervisord -c /home/imb/imb/supervisord.conf
As far as I understand I now should be able to restart gunicorn using the command supervisorctl restart gunicorn
, but when I do that I get
$ supervisorctl restart gunicorn
unix:///var/run/supervisor.sock no such file
I checked and the file /var/run/supervisor.sock
indeed doesn't exist, even though I'm sure supervisor is in fact running:
$ ps -A | grep supervisor
27211 ? 00:00:00 supervisord
Does anybody know why the /var/run/supervisor.sock
file isn't created, even though supervisor is clearly running? All tips are welcome!