Consent to the use of Personal Data and Cookies

This website needs your consent to use cookies in order to customize ads and content.

If you give us your consent, data may be shared with Google.

Fix: supervisor.sock no such file

How to fix an obscure error from supervisor with the .sock file.


By. Jacob

Edited: 2022-10-31 10:18

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

This error message can probably occur in response to numerous of circumstances, but there is one particularly stupid reason as to why this happens: an invalid process configuration file.

Having an invalid process configuration means that the supervisor service will not start properly, and hence the .sock file is never created. The fix is, probably not surprisingly, simple: make sure your process configuration is valid.

Another symptom of this error can be seen when running supervisorctl reload. E.g:

error: <class 'FileNotFoundError'>, [Errno 2] No such file or directory: file: /usr/lib/python3/dist-packages/supervisor/ line: 560

Supervisor typically stores the process configuration in /etc/supervisor/conf.d/, you should make sure that each file in this location has a valid configuration. A valid configuration looks like this:

command=php /var/www/shopware/bin/console scheduled-task:run -n --memory-limit=256M

Supervisor is particularly sensitive to invalid configuration files, and does not have a super helpful error message for errors in the configuration.

After fixing your configuration, you should be able to restart the supervisor service:

sudo systemctl stop supervisor
sudo systemctl start supervisor
sudo systemctl restart supervisor

This will fix the supervisorctl command as well:

sudo supervisorctl status
sudo supervisorctl reload
sudo supervisorctl restart all

Tell us what you think:

    More in: supervisor