root@dev-demo-karl:/srv/www# supervisord -v
3.3.1
Trying to get supervisorctl
working:
root@dev-demo-karl:/srv/www# supervisorctl
http://localhost:9001 refused connection
My config:
[supervisord]
nodaemon=true
[supervisorctl]
root@dev-demo-karl:/srv/www# supervisord -v
3.3.1
Trying to get supervisorctl
working:
root@dev-demo-karl:/srv/www# supervisorctl
http://localhost:9001 refused connection
My config:
[supervisord]
nodaemon=true
[supervisorctl]
Apparently there are required fields for the configuration file for version 3.0 and upwards http://supervisord.org/configuration.html
[inet_http_server]
is required:Also [rpcinterface:supervisor] is required as it complains.
So my configuration must look like so:
Now it connects.
Be sure to check the following if you get the
http://localhost:9001 refused connection
error.supervisord
is runningHave these enabled (uncommented) in
supervisord.conf
file:a)
b)
c)
Note: The host and port of the inet server and the one which supervisorctl is trying to connect to should be the same.
At first You should start
supervisord
with-c
flag and point the cfg file.sudo supervisord -c /path/to/config/file
after that run
supervisorctl
Try to run
supervisord
withsudo
to make sure this is not premission issue. If everything works right You may start the app without thesudo
.-c
flag may be needed withsupervisorctl
as well if I remember correct, but I'm not sure its necessary.By Default inet_http_server is turned off in supervisor config. You need to enable if if exist or add the following lines if it doesn't
[inet_http_server] port = 127.0.0.1:9001
Then restart Supervisord; You should be all set sudo
supervisorctl status
should show processes with corresponding statuses