Supervisor no such file socket.py

You should run sudo service supervisor start when you are in the supervisor dir.
Worked for me.


In Ubuntu 18.04 with distribution's package

You probably did the same mistake as me an created the config file /etc/supervisord.conf while my service manager (systemd) was using the config file /etc/supervisor/supervisord.conf

Solutions

  • Remove the config file created

    sudo rm /etc/supervisord.conf
    
  • Move it to the correct location

    sudo mv /etc/supervisord.conf /etc/supervisor/supervisord.conf
    

Now you can run sudo supervisorctl


Why?

when you run supervisorctl it first searches for the config file located at /etc/supervisord.conf, if it's not present, it will search for the package's default file /etc/supervisor/supervisord.conf this is the one systemd actually runs.

Systemd always use the file /etc/supervisor/supervisord.conf regardless of the other file's existence.

You can check which file is using systemd by running sudo systemctl status supervisor

enter image description here You can see in the last line the command where the config file is hardcoded


2020 UPDATE

Try running sudo service supervisor start in your terminal before using the below solution. I found out that the issue sometimes occurs when supervisor is not running, nothing complicated.

I am using Ubuntu 18.04. I had the same problem and re-installing supervisor did not solve my problem.

I ended up completely removing the conf.d directory and recreating it with new configs. Make sure you back up your configurations before trying this:

  1. sudo rm -rf /etc/supervisor/conf.d/
  2. sudo mkdir /etc/supervisor/conf.d
  3. sudo nano /etc/supervisor/conf.d/my-file.conf
  4. Copy+Paste your configuration into your new file.

sudo supervisorctl reread started working again.