Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unix:///var/run/supervisor.sock no such file #480

Closed
behnampmdg3 opened this issue Aug 20, 2014 · 68 comments
Closed

unix:///var/run/supervisor.sock no such file #480

behnampmdg3 opened this issue Aug 20, 2014 · 68 comments

Comments

@behnampmdg3
Copy link

@behnampmdg3 behnampmdg3 commented Aug 20, 2014

I don't seem to be able to get supervisor to run! Here are the details:

vagrant@homestead:/etc/supervisor$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty
vagrant@homestead:/etc/su

vagrant@homestead:/etc/supervisor$ sudo apt-get install supervisor
Reading package lists... Done
Building dependency tree
Reading state information... Done
supervisor is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 70 not upgraded.

vagrant@homestead:/etc/supervisor$ sudo service supervisor restart
Restarting supervisor: supervisord.

vagrant@homestead:/etc/supervisor$ sudo supervisord
/usr/lib/python2.7/dist-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
'Supervisord is running as root and it is searching '

vagrant@homestead:/etc/supervisor$ sudo supervisorctl
unix:///var/run/supervisor.sock no such file
supervisor> help

default commands (type help ):

add clear fg open quit remove restart start stop update
avail exit maintail pid reload reread shutdown status tail version

supervisor> reread
error: <class 'socket.error'>, [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 224

supervisor> update
error: <class 'socket.error'>, [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 224

Here are some more details:

vagrant@homestead:/etc/supervisor$ sudo apt-cache show supervisor
Package: supervisor
Priority: extra
Section: universe/admin
Installed-Size: 1485
Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com
Original-Maintainer: Qijiang Fan fqj1994@gmail.com
Architecture: all
Version: 3.0b2-1
Depends: python, python-meld3, python-pkg-resources (>= 0.6c7)
Filename: pool/universe/s/supervisor/supervisor_3.0b2-1_all.deb
Size: 313972
MD5sum: 1e5ee03933451a0f4fc9ff391404f292
SHA1: d9dc47366e99e77b6577a9a82abd538c4982c58e
SHA256: f83f89a439cc8de5f2a545edbf20506695e4b477c579a5824c063fbaf94127c1
Description-en: A system for controlling process state
Supervisor is a system for controlling and maintaining process state,
similar to what init does, but not intended as an init replacement.
.
It will manage individual processes or groups of processes that
need to be started and stopped in order, and it is possible to
control individual process state via an rpc mechanism, thus allowing
ordinary users to restart processes.
Description-md5: b18ffbeaa3a697e8ccaee9cc104ec380
Homepage: http://supervisord.org/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

Thanks

@msabramo
Copy link
Contributor

@msabramo msabramo commented Aug 20, 2014

You shouldn't have to do sudo supervisord. It should've already been started. I would try connecting after doing the restart.

@behnampmdg3
Copy link
Author

@behnampmdg3 behnampmdg3 commented Aug 20, 2014

Same thing:

vagrant@homestead:/etc/supervisor$ sudo service supervisor restart
Restarting supervisor: supervisord.
vagrant@homestead:/etc/supervisor$ sudo supervisorctl
unix:///var/run/supervisor.sock no such file
supervisor>

@behnampmdg3
Copy link
Author

@behnampmdg3 behnampmdg3 commented Aug 21, 2014

Anyone knows about this?

@msabramo
Copy link
Contributor

@msabramo msabramo commented Aug 21, 2014

Is supervisord running?

pgrep -fl supervisor

If it's not, you need to figure out why; maybe look at tail -f /var/log/supervisor/supervisord.log

If it is running, then probably the config is not as expected. I would try using lsof:

vagrant@vagrant-ubuntu-trusty-64:~$ sudo lsof -c supervisord | egrep 'COMMAND|sock'
COMMAND    PID USER   FD   TYPE             DEVICE SIZE/OFF   NODE NAME
superviso 2240 root    5u  unix 0xffff8800374fa300      0t0 171865 /var/run/supervisor.sock.2233

Make sure that supervisord and supervisorctl are both using the same config file. They both support a -c option to explicitly specify the config file; this may come in handy.

@behnampmdg3
Copy link
Author

@behnampmdg3 behnampmdg3 commented Aug 21, 2014

Hey

This file does not exist on my computer: /var/run/supervisor.sock

Here is the code you sent:

vagrant@homestead:/etc/supervisor$ pgrep -fl supervisor
vagrant@homestead:/etc/supervisor$ tail -f /var/log/supervisor/supervisord.log
2014-08-21 06:42:44,699 INFO RPC interface 'supervisor' initialized
2014-08-21 06:42:44,699 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2014-08-21 06:42:44,709 INFO daemonizing the supervisord process
2014-08-21 06:42:44,721 INFO supervisord started with pid 32042
2014-08-21 06:46:24,288 CRIT Supervisor running as root (no user in config file)
2014-08-21 06:46:24,288 WARN Included extra file "/etc/supervisor/conf.d/queue.conf" during parsing
2014-08-21 06:46:24,353 INFO RPC interface 'supervisor' initialized
2014-08-21 06:46:24,353 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2014-08-21 06:46:24,364 INFO daemonizing the supervisord process
2014-08-21 06:46:24,372 INFO supervisord started with pid 32081

vagrant@homestead:/etc/supervisor$ sudo lsof -c supervisord | egrep 'COMMAND|sock'
vagrant@homestead:/etc/supervisor$

This is /etc/supervisor/supervisord.conf

vagrant@homestead:/etc/supervisor$ cat supervisord.conf
; supervisor config file

[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; 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
vagrant@homestead:/etc/supervisor$

@mnaberez
Copy link
Member

@mnaberez mnaberez commented Aug 22, 2014

Please ask questions about installing or using Supervisor on the mailing list.

@mnaberez mnaberez closed this Aug 22, 2014
@kovacshuni
Copy link

@kovacshuni kovacshuni commented Apr 29, 2015

Same problem here, don't know how to solve it yet. :(

@ethought
Copy link

@ethought ethought commented May 5, 2015

Same problem here

@rodrigobendia
Copy link

@rodrigobendia rodrigobendia commented Jun 9, 2015

This should solve this problem:

sudo touch /var/run/supervisor.sock
sudo chmod 777 /var/run/supervisor.sock
sudo service supervisor restart
@srikiraju
Copy link

@srikiraju srikiraju commented Jun 12, 2015

Make sure you have a [unix_http_server] and [rpcinterface:supervisor] section in your conf file

@xzyaoi
Copy link

@xzyaoi xzyaoi commented Aug 1, 2015

@rodrigobendia it doesn't work.

@rex
Copy link

@rex rex commented Aug 25, 2015

@rodrigobendia I'm having mixed results with those commands as well. As far as I can see, they work. I'm just working inside a Docker container and something keeps killing the /var/run/supervisor.sock file :) I'll try and remember to update here if/when I figure it out.

@jartaud
Copy link

@jartaud jartaud commented Sep 3, 2015

@rodrigobendia works for me. Thanks!

@vikas-sharma1
Copy link

@vikas-sharma1 vikas-sharma1 commented Oct 3, 2015

I found the fix. Please try.

please add below 2 section to your supervisord.conf -

[unix_http_server]
file = /var/tmp/supervisor.sock ;

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

Thanks
Vikas

@codingwithoutcomments
Copy link

@codingwithoutcomments codingwithoutcomments commented Nov 4, 2015

@rex did you figure out why the the sock file was being killed inside the docker container?

@rex
Copy link

@rex rex commented Nov 13, 2015

@codingwithoutcomments I didn't, unfortunately. I was working on it for a contract gig at the time that has since ended and I no longer have access to the machine in question. :-/

@liutxer
Copy link

@liutxer liutxer commented Dec 17, 2015

may be you conf file raise this error. you should check you conf

@raphaelsoul
Copy link

@raphaelsoul raphaelsoul commented Mar 22, 2016

I have had the same problem both on my Ubuntu 14.04 Lts and CentOS 7.0.1 server. It runs well untill last week.

After viewing the issues and checking the command outputting on my server. It should be caused by the permissions of directory.

The configure I used before the outputting of command echo_supervisord_conf,which indicate the file in [unix_http_server] and serverurl in [supervisorctl] section to /tmp/supervisor.sock. permission is 0770.

And I got

unix:///tmp/supervisor.sock no such file

Now I configure it to /var/run/supervisor.sock. And it works now again.

Hope this will be helpful

@lucian303
Copy link

@lucian303 lucian303 commented Mar 30, 2016

Still getting this problem in docker with Ubuntu 14.04 and supervisord 3.0b2

This issue also seems to be a duplicate of:
#121

I'm going to open a new issue since both are closed.

@mnaberez
Copy link
Member

@mnaberez mnaberez commented Mar 30, 2016

I'm going to open a new issue since both are closed.

Please do not open duplicate issues.

@lucian303
Copy link

@lucian303 lucian303 commented Mar 30, 2016

@mnaberez I'll just post this here then:

Test system: Clean Ubuntu 14.04 install with supervisord 3.0b2 inside a docker container.

To save time:

  • It's not a config file issue. The config file exists and is being read (tried implicitly and explicitly).
  • The socket file does not exist when I inspect the system
  • Supervisor starts up correctly (see logs below)
  • Supervisor runs with default config.
  • Supervisor is running. Controlling it is not possible.
  • Changing sock file permissions to 770 does nothing.
  • /run (or /var/run) has the correct permissions and supervisord is started by root
  • This is reproducible in multiple images

Previous issues:
#480
#121

supervisor.log:

2016-03-30 00:55:52,592 CRIT Supervisor running as root (no user in config file)
2016-03-30 00:55:52,603 INFO supervisord started with pid 6
2016-03-30 00:55:53,605 INFO spawned: 'nginx' with pid 9
2016-03-30 00:55:53,606 INFO spawned: 'php-fpm' with pid 10
2016-03-30 00:55:53,609 INFO spawned: 'newrelic-sysmond' with pid 11
2016-03-30 00:55:53,701 INFO success: newrelic-sysmond entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2016-03-30 00:55:54,919 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-03-30 00:55:54,919 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-03-30 00:55:54,919 INFO exited: newrelic-sysmond (exit status 0; expected)

conf.d/supervisord.conf:

[supervisord]
nodaemon=true
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
childlogdir=/var/log/supervisor

[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
user = root
autostart=true
autorestart=true
priority=10
stdout_events_enabled=true
stderr_events_enabled=true

[program:php-fpm]
command=/usr/sbin/php-fpm7.0 --nodaemonize --fpm-config /etc/php/7.0/fpm/php-fpm.conf
user = root
autostart = true
autorestart = true

[program:newrelic-sysmond]
command=service newrelic-sysmond start
user = root
autostart = true
startsecs=0
@mnaberez
Copy link
Member

@mnaberez mnaberez commented Mar 30, 2016

The configuration file above is missing a [unix_http_server] section, a [supervisorctl] section, and an [rpcinterface:supervisor] section. supervisord is not creating a socket file because it has not been configured to do so in the configuration file. See the configuration guide and the output of echo_supervisord_conf for examples of these sections.

@lucian303
Copy link

@lucian303 lucian303 commented Mar 30, 2016

@mnaberez Sorry I wasn't clearer. The supervisord config file at /etc/supervisor/supervisord.conf is the default one. That's just the one in conf.d (it has the same name cause that's the only way I could get supervisor to see it).

; supervisor config file

[unix_http_server]
file=/var/run/supervisor.sock   ; (the path to the socket file)
chmod=0700                       ; 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
@mnaberez
Copy link
Member

@mnaberez mnaberez commented Mar 30, 2016

If this configuration was being used, your log file should contain these lines:

INFO RPC interface 'supervisor' initialized
CRIT Server 'unix_http_server' running without any HTTP authentication checking

The first line is logged when [rpcinterface:supervisor] is read. The second line is logged when a [unix_http_server] section is specified without a username/password.

Since these lines are absent from your log, it does appear that supervisord hasn't been configured correctly. I would check the configuration again, e.g. perhaps supervisord is not using the configuration file(s) you think it is.

@lucian303
Copy link

@lucian303 lucian303 commented Mar 30, 2016

@mnaberez You're right. That was the problem. I had accidentally explicitly specified the config file as the one in conf.d, which apparently leads to the above also. facepalm Thanks so much for your help!

@Longbingfeihua
Copy link

@Longbingfeihua Longbingfeihua commented Mar 31, 2016

yes itis!

@timothy12387
Copy link

@timothy12387 timothy12387 commented Apr 19, 2016

@rodrigobendia it works for me.. thanks

@lifeofguenter
Copy link

@lifeofguenter lifeofguenter commented Jul 22, 2016

Why is this being closed with work arounds but no real fix? Does not work here as well (Debian 8).

@mnaberez
Copy link
Member

@mnaberez mnaberez commented Jul 22, 2016

Why is this being closed with work arounds but no real fix?

There's no single fix because there are many reasons why the file might not be found, and we can't control most of them: supervisord might not be running and thus didn't create it, supervisord might be running but the file may have been deleted by something else, there may be a misconfiguration, or it may even be a problem in distribution packaging. We've troubleshot this problem on the mailing list and several issues, but in all the cases I'm aware of, it ended up being one of those issues. We certainly try to fix bugs we are aware of, but at this time we don't know a bug related to this that we can fix.

@homeworkprod
Copy link

@homeworkprod homeworkprod commented Mar 30, 2018

Ran into "unix:///var/run/supervisor.sock no such file" as well, on Debian Stretch.

In my case that symptom was caused by program configuration files (/etc/supervisor/conf.d/*.conf) copied from another server that included user directives without the specified user names actually existing on the system in question.

I discovered the helpful error message in the output of systemd's # journalctl -xn, but not in supervisor's own logfile (/var/log/supervisor/supervisor.log in my case).

So now I can use supervisorctl without the error message (see first paragraph) appearing, and it seems to work.
And that without setting username and password anywhere and/or switching from unix_http_server to inet_http_server (like I did on the other server for whatever reason years ago).

@avinashkuv
Copy link

@avinashkuv avinashkuv commented May 21, 2018

Replace this
[unix_http_server]
file=/var/run/supervisor.sock

with

[unix_http_server]
file=/tmp/supervisor.sock

then restart the supervisor it will work. it throws an error because the user doesn't have permission create sock file

@ercancavusoglu
Copy link

@ercancavusoglu ercancavusoglu commented Jun 19, 2018

touch /var/run/supervisor.sock
sudo supervisord -c /etc/supervisor/supervisord.conf
and after ,
supervisorctl restart all

@wtorcaso
Copy link

@wtorcaso wtorcaso commented Sep 19, 2018

I had this problem on a fresh Ubuntu, hosted on AWS.

The workaround I found it this:

function sctl() {
sudo -H -E supervisorctl -c /etc/supervisor/supervisord.conf "$@";
}

I checked the version of Python, and the executable of supervisorctl, and the value of $PATH, and I grep everything in the /etc/tree. Nothing made a difference. But referencing the config file by its full path made the problem go away.

My theory is that a bare 'supervisorctl' command was not reading the config file, and that "unix:///tmp/supervisor.sock" is a built-in default value for the socket file. This explains the observed behavior, but I have no explanation of why that might be happening.

@sdanbury
Copy link

@sdanbury sdanbury commented Sep 21, 2018

I was hitting this also, so I just ran the following manually again and again until it wasn't complaining anymore (usually it was to do with log directories not existing):

/usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
@loretoparisi
Copy link

@loretoparisi loretoparisi commented Oct 15, 2018

@sdanbury @wtorcaso I'm still getting this error, while it seems it is reading the right config

2018-10-15 22:42:07,094 INFO supervisord started with pid 212
2018-10-15 22:42:08,099 INFO spawned: 'tornado' with pid 215
2018-10-15 22:42:09,102 INFO success: tornado entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-10-15 22:42:14,348 INFO exited: tornado (exit status 0; expected)
2018-10-15 22:42:15,357 INFO spawned: 'tornado' with pid 294
2018-10-15 22:42:16,360 INFO success: tornado entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
^C2018-10-15 22:42:20,229 WARN received SIGINT indicating exit request
2018-10-15 22:42:20,229 INFO waiting for tornado to die
2018-10-15 22:42:20,276 INFO stopped: tornado (terminated by SIGTERM)
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL  for a unix socket

[unix_http_server]
file=/var/run/supervisor.sock   ; (the path to the socket file)
chmod=0700                       ; sockef file mode (default 0700)

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

[supervisord]
nodaemon=true
logfile_maxbytes=50MB        ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10           ; (num of main logfile rotation backups;default 10)
loglevel=info                ; (log level;default info; others: debug,warn,trace)

[program:tornado]
command=python /tornado_api/config.py
directory=/tornado_api
stdout_logfile=/var/log/tornado/access.log
loglevel=info
redirect_stderr=true
@haideritx
Copy link

@haideritx haideritx commented Dec 26, 2018

This should solve this problem:

sudo touch /var/run/supervisor.sock
sudo chmod 777 /var/run/supervisor.sock
sudo service supervisor restart

unrecognized service

@jtsamas
Copy link

@jtsamas jtsamas commented Feb 9, 2019

touch /var/run/supervisor.sock
sudo supervisord -c /etc/supervisor/supervisord.conf
and after ,
supervisorctl restart all
This worked perfect for me . Thanks Dude

@company-ms
Copy link

@company-ms company-ms commented Apr 8, 2019

Ok guys, it works supervisord -c /etc/supervisor/supervisord.conf
But it works to reload.
somebody solve this problem??

@company-ms
Copy link

@company-ms company-ms commented Apr 8, 2019

Ok . I decided this problem.
I simply add command "supervisord -c /etc/supervisor/supervisord.conf" in autorun.
Follow my commands:
1)
sudo nano /etc/init.d/local.autostart
2)
add in file:

#!/bin/sh
supervisord -c /etc/supervisor/supervisord.conf

sudo chmod +x /etc/init.d/local.autostart
4)
cd /etc/init.d/
5)
sudo update-rc.d local.autostart defaults 80
6)
reboot

Having fun!!

@jstaf
Copy link

@jstaf jstaf commented May 10, 2019

I know this is an ancient issue, but I figured I would comment on it because the rest of the comments don't cover the root cause of it.

Starting supervisord does indeed create the supervisor.sock file. But if the supervisor.sock file is placed in /var/tmp or /tmp, the socket will actually be periodically deleted every 30 days by either systemd-tempfiles or tmpwatch (causing all supervisor commands to fail, even though supervisord is still running). The solution is to change your supervisor config so that the socket file is put somewhere else, such as in /var/run.

varac added a commit to varac/openproject that referenced this issue May 29, 2019
supervisorctl needs these entries in supervisord.conf,
otherwise it will fail with
`unix:///var/run/supervisor.sock no such file`.
See Supervisor/supervisor#480 for more
details.
@yurisyb
Copy link

@yurisyb yurisyb commented Jun 14, 2019

I don't seem to be able to get supervisor to run! Here are the details:

vagrant@homestead:/etc/supervisor$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty
vagrant@homestead:/etc/su

vagrant@homestead:/etc/supervisor$ sudo apt-get install supervisor
Reading package lists... Done
Building dependency tree
Reading state information... Done
supervisor is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 70 not upgraded.

vagrant@homestead:/etc/supervisor$ sudo service supervisor restart
Restarting supervisor: supervisord.

vagrant@homestead:/etc/supervisor$ sudo supervisord
/usr/lib/python2.7/dist-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
'Supervisord is running as root and it is searching '

vagrant@homestead:/etc/supervisor$ sudo supervisorctl
unix:///var/run/supervisor.sock no such file
supervisor> help

default commands (type help ):

add clear fg open quit remove restart start stop update
avail exit maintail pid reload reread shutdown status tail version

supervisor> reread
error: <class 'socket.error'>, [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 224

supervisor> update
error: <class 'socket.error'>, [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 224

Here are some more details:

vagrant@homestead:/etc/supervisor$ sudo apt-cache show supervisor
Package: supervisor
Priority: extra
Section: universe/admin
Installed-Size: 1485
Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com
Original-Maintainer: Qijiang Fan fqj1994@gmail.com
Architecture: all
Version: 3.0b2-1
Depends: python, python-meld3, python-pkg-resources (>= 0.6c7)
Filename: pool/universe/s/supervisor/supervisor_3.0b2-1_all.deb
Size: 313972
MD5sum: 1e5ee03933451a0f4fc9ff391404f292
SHA1: d9dc47366e99e77b6577a9a82abd538c4982c58e
SHA256: f83f89a439cc8de5f2a545edbf20506695e4b477c579a5824c063fbaf94127c1
Description-en: A system for controlling process state
Supervisor is a system for controlling and maintaining process state,
similar to what init does, but not intended as an init replacement.
.
It will manage individual processes or groups of processes that
need to be started and stopped in order, and it is possible to
control individual process state via an rpc mechanism, thus allowing
ordinary users to restart processes.
Description-md5: b18ffbeaa3a697e8ccaee9cc104ec380
Homepage: http://supervisord.org/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

Thanks

cat all the file from /etc/supervisor/conf.d and past to a local folder then restart your ubuntu and copy/past the file back to their /etc/supervisor/conf.d from local folder and use below command
supervisorctl
reread
update
status

@armavion
Copy link

@armavion armavion commented Aug 15, 2019

Here's my problem, and how I solved it:

In one of the configuration files, there was a script that couldn't be found.

So:

  1. restarting supervisor service didn't help,
  2. sudo supervisord didn't help either.

First I fixed the error in the config file and sudo service supervisor restart and voila!

@kobusbeets
Copy link

@kobusbeets kobusbeets commented Aug 28, 2019

Is supervisord running?

pgrep -fl supervisor

If it's not, you need to figure out why; maybe look at tail -f /var/log/supervisor/supervisord.log

If it is running, then probably the config is not as expected. I would try using lsof:

vagrant@vagrant-ubuntu-trusty-64:~$ sudo lsof -c supervisord | egrep 'COMMAND|sock'
COMMAND    PID USER   FD   TYPE             DEVICE SIZE/OFF   NODE NAME
superviso 2240 root    5u  unix 0xffff8800374fa300      0t0 171865 /var/run/supervisor.sock.2233

Make sure that supervisord and supervisorctl are both using the same config file. They both support a -c option to explicitly specify the config file; this may come in handy.

I am running a CentOS 7 server. For some reason, after installing Supervisor, I was unable to get it started and unable to locate the "missing" supervisor.sock file.

I installed supervisor using the following command:
sudo yum -y install supervisor

The following steps fixed it for me on CentOS 7.

  1. Created the config file I want supervisor to use.
    echo_supervisord_conf > /etc/supervisord.conf

  2. Updated the following line in the config file using nano (my preferred editor).
    nano /etc/supervisord.conf

[unix_http_server]
file=/var/run/supervisor/supervisor.sock   ; (the path to the socket file)
  1. Made sure the supervisor directory is available in /var/run.
    mkdir -p /var/run/supervisor

  2. Told supervisor where to look for the config file.
    supervisord -c /etc/supervisord.conf

  3. Re-read and restarted supervisor
    supervisorctl reread && supervisorctl restart all

@ViettelGroup-hungnd67
Copy link

@ViettelGroup-hungnd67 ViettelGroup-hungnd67 commented Oct 18, 2019

In my situation, this is worked for me:
mkdir /var/log/supervisor
sudo supervisord -c /etc/supervisor/supervisord.conf

@MarcosBouzon
Copy link

@MarcosBouzon MarcosBouzon commented Nov 25, 2019

I had the same problem and after I ran supervisord the log showed that the problem was coming from an old service that supervisor was trying to start but I deleted that program folder time ago, but not from the supervisor conf.d/ folder. so it was trying to start a program who didn't exist, and this caused the problem.

@AFarmerLearnToCode
Copy link

@AFarmerLearnToCode AFarmerLearnToCode commented Nov 26, 2019

I had the same problem and after I ran supervisord the log showed that the problem was coming from an old service that supervisor was trying to start but I deleted that program folder time ago, but not from the supervisor conf.d/ folder. so it was trying to start a program who didn't exist, and this caused the problem.

Have you tried to re-install supervisor?

@MarcosBouzon
Copy link

@MarcosBouzon MarcosBouzon commented Nov 26, 2019

@brucek2
Copy link

@brucek2 brucek2 commented Nov 27, 2019

After trying every other suggestion on this page, removing and reinstalling is what finally worked for me. I wonder if there was briefly a bad package out there and that's what I had?

@MohammedElmsellem
Copy link

@MohammedElmsellem MohammedElmsellem commented Dec 24, 2019

Remove config files
Create new config file
Restart supervisor service

@DooblyNoobly
Copy link

@DooblyNoobly DooblyNoobly commented Jan 7, 2020

You may have another supervisord.conf file somewhere in your file system. For me I found one at etc/supervisord.conf that was pointing to an old supervisor.sock file that no longer exists. Removing the old supervisord.conf fixed the problem as supervisor started to use the config I intended it to use in etc/supervisor/ folder

@jinfagang
Copy link

@jinfagang jinfagang commented Jan 14, 2020

error: <class 'socket.error'>, [Errno 111] Connection refused: file: /usr/lib/python2.7/socket.py line: 228
@onemans-battle
Copy link

@onemans-battle onemans-battle commented Apr 4, 2020

If I set error user in [program] such as user=notexituser,
the cmd supervisorctl restart supervisorctl status will echo

unix:///var/run/supervisor.sock no such file
or 
unix:///var/run/supervisor.sock refused connection

This is the problem I encountered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.