1

Distro

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.11 (stretch)
Release:        9.11
Codename:       stretch

How I installed supervisor

$ sudo apt install supervisor
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze
Lettura informazioni sullo stato... Fatto
Pacchetti suggeriti:
  supervisor-doc
I seguenti pacchetti NUOVI saranno installati:
  supervisor
0 aggiornati, 1 installati, 0 da rimuovere e 0 non aggiornati.
È necessario scaricare 280 kB di archivi.
Dopo quest'operazione, verranno occupati 1.452 kB di spazio su disco.
Scaricamento di:1 http://ftp.it.debian.org/debian stretch/main amd64 supervisor all 3.3.1-1+deb9u1 [280 kB]
Recuperati 280 kB in 0s (3.729 kB/s)
Selezionato il pacchetto supervisor non precedentemente selezionato.
(Lettura del database... 73752 file e directory attualmente installati.)
Preparativi per estrarre .../supervisor_3.3.1-1+deb9u1_all.deb...
Estrazione di supervisor (3.3.1-1+deb9u1)...
Configurazione di supervisor (3.3.1-1+deb9u1)...
Elaborazione dei trigger per systemd (232-25+deb9u12)...
Elaborazione dei trigger per man-db (2.7.6.1-2)...

I created `/etc/supervisor/conf.d/project_worker.conf

[program:project-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/project/artisan queue:work redis --sleep=3 --tries=10 --delay=15
autostart=true
autorestart=true
user=realtebo
numprocs=1
redirect_stderr=true
stdout_logfile=/var/www/html/project/storage/logs/master_laravel_worker.log

The problems

Tryed to read config

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

Tried to reload

$ sudo supervisorctl reload
error: <class 'socket.error'>, [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 228

Tried to force start anyway

$ sudo supervisorctl start
unix:///var/run/supervisor.sock no such file

I am also not able to ask supervisor its own version

$ sudo supervisorctl version
unix:///var/run/supervisor.sock no such file

What I tried

Tried to stop/start service: error is still here

$ sudo service supervisor stop
$ sudo service supervisor start
$ sudo supervisorctl version
unix:///var/run/supervisor.sock no such file
1

I've not found the reason, but I resolved in the hardest way

sudo apt purge supervisor
sudo reboot

Note: I ended to reboot after purge because purge/reinstall was not working.

After then, reinstalled, recreated the conf.d/ files.

All works now.

Probably the source cause was a recent system upgrade, but I'm not sure.

Sorry to say I've not a better solution and also I've not an explanation.

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.