I installed Supervisor (v3.1.2) to manage ElastAlert but when I run supervisorctl it sometimes throws this error:

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

and other times it throws this error:

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

I'll note that it does bring me to the supervisor> prompt, but commands after that are the same errors as above. The /etc/supervisor/supervisor.conf file is configured to use /var/run, which seems at odds with the second error.

I created a link to /etc/supervisor.conf, as other help pages suggested this, but it didn't make a difference.

Two odd things, when I first installed Supervisor it worked fine, but it was after a reboot this problem started. And the other odd thing is that ElastAlert starts after a reboot, and continues to perform normally. So while it might be having errors it's doing its job. Not a show-stopper, but I would like for this to work properly.

Any ideas?

  • 1
    Sorry if this isn't exactly on-topic, but why not just use systemd for this? – fuero Oct 12 '16 at 23:23
  • Indeed, supervisord is pretty much obsolete. – Michael Hampton Oct 13 '16 at 2:21
  • Well I did attempt to create a service, but I felt it became overwhelming for such a simple script to run. – Canadian Oct 13 '16 at 17:03
  • That's odd, because systemd units are generally quite simple. Someone's probably already written one, in fact... – Michael Hampton Jan 4 '17 at 2:25

This happens to me when the physical machine reboots. My machines run Ubuntu, ranging from 12.04 to 16.04. I resolve it by restarting supervisor as a service.

sudo service supervisor stop
sudo service supervisor start 

(This somehow works a lot better than simply using 'restart')

Obviously this is not an ideal fix if you depend on Supervisor to start other programs for you without needing to be restarted after every reboot. I am currently looking into systemd like others suggested.

Edit: If you are on Ubuntu 16.04, this answer might fix all your problem as it did mine. You should 'enable' systemd to start supervisord. https://unix.stackexchange.com/a/291098


I had this problem while hosting my django app. My machine is aws=>ec2=>ubuntu 18.x

I had wrong configuration of my gunicorn bash file. when i fixed the path issue in gunicorn file. supervisor started working back.

make sure you configured it well:

DJANGODIR=/home/ubuntu/<my-project>               # Django project directory
SOCKFILE=/home/ubuntu/<my-project>/run/gunicorn.sock  # we will communicte using this unix socket
New contributor
Ravi Anand is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.