When running supervisorctl I get unix:///var/run/supervisor.sock refused connection.
Maybe it's relevant, I'm running supervisor in a Debian docker container inside CoreOS in Virtualbox. I'm running supervisorctl from within the container.
supervisord -v: 3.0
ls -al /var/run/supervisor.sock: srwxrwxrwx. 1 root root 0 Sep 2 09:34 /var/run/supervisor.sock
Config:
; supervisor config file
[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0777 ; sockef file mode (default 0700)
[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.
[include]
files = /etc/supervisor/conf.d/*.conf
I'm having the same issue. In a docker container that has the same supervisor version 3.0r1-1 (according to dpkg -l supervisor) works fine.
This started to happen yesterday that I rebuild the image to add a new dependency, I've tried specifying -c in supervisorctl, and adding loglevel=debug on the supervisord section but there is no light to solve it.
supervisorctl -c supervisord.conf status
unix:///var/run/supervisor.sock refused connection
@crybat I've found the real issue, is this one https://github.com/docker/docker/issues/12080 it's an issue with overlayfs as storage driver for docker. Supervisor is not the issue here.
@marceloandrader Thanks. I switched to boot2docker in virtualbox and it works for my needs.
Yes, this issue is related to overlayfs.
To fix it you can add --tmpfs /var/run/ to your docker run command.
This will mount this folder in memory and you should not have issues with this unix socket.
add --tmpfs /var/run/ to my docker run command didn't work for me.
The way I fixed my problem is to replace my docker service to use AUFS.
What I did is to uninstall my old docker service (remember to export your images to disk)
and reinstalled a docker with AUFS storage driver just like the following link
https://gist.github.com/parente/025dcb2b9400a12d1a9f
my old images running on new docker service
supervisorctl -c supervisord.conf
no longer got refused connection
Most helpful comment
@crybat I've found the real issue, is this one https://github.com/docker/docker/issues/12080 it's an issue with overlayfs as storage driver for docker. Supervisor is not the issue here.