The '/var/run/supervisor.sock' file is not being created when I use Supervisord
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game Looping
--
Chapters
00:00 The '/Var/Run/Supervisor.Sock' File Is Not Being Created When I Use Supervisord
01:13 Accepted Answer Score 12
01:58 Answer 2 Score 6
02:26 Answer 3 Score 3
03:31 Answer 4 Score 0
03:55 Thank you
--
Full question
https://superuser.com/questions/1069276/...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #ubuntu #daemon #supervisord
#avk47
ACCEPTED ANSWER
Score 12
Alright, after messing around some more I found what I did wrong.
Turns out the lines for supervisorctl
below, only tell supervisorctl
where it can find the socket file.
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
Further above in the file there are two other lines which define where the file is actually created:
[unix_http_server]
file=/tmp/supervisor.sock
As you can see that created the socket file in /tmp/
while supervisorctl
tried to read it from /var/run/
. I changed the last line to file=/var/run/supervisor.sock
and now it works beatifully.
I hope this answer might help someone else dealing with the same trouble.
Also, you can check out the link provided by @MariusMatutiae in the comments: https://stackoverflow.com/questions/10716159/nginx-and-supervisor-setup-in-ubuntu
ANSWER 2
Score 6
For users who have the same entry for both
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock
&
[unix_http_server]
file=/tmp/supervisor.sock
follow below steps to fix the problem -
- Delete .sock file from /tmp
- Run 'supervisord' command. This will recreate the sock file.
- Run 'supervisorctl -i' to check the status of the services.
Hope this helps you!
ANSWER 3
Score 3
After too much struggling with this issue, with everybody telling me to just enable
or restart
which was not working. I finally found out the solution for me:
- First of all acknowledge that you have the main supervisor.conf file here:
/etc/supervisor/supervisor.conf
- If you are in my case, you also have a project specific
.conf
file in here:/etc/supervisor/conf.d/project.conf
Somehow supervisorctl
was working fine but the weird thing is that doing service supervisor restart
breaks everything and you get the error of OP.
The solution then is to:
- Rename
project.conf
toproject.conf.tmp
- Then
service supervisor restart
(after whatsupervisorctl
works again) - You rename back your project conf file to
project.conf
supervisorctl reread
,supervisorctl update
,supervisorctl restart all
ANSWER 4
Score 0
vi /opt/conf/supervisord.conf
[supervisord]
nodaemon=true
[unix_http_server]
file=/var/run/supervisor.sock
; rpc interface for supervisorctl
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
[program:program1]
run supervisord
/usr/bin/supervisord -c /opt/conf/supervisord.conf
run supervisorctl
/usr/bin/supervisorctl -c /opt/conf/supervisord.conf