I have a fairly basic supervisor config:
[program:drape]
process_name=%(program_name)s_%(process_num)02d
command=python /home/ubuntu/drape/workers/drape.py
numprocs=1
autostart=true
autorestart=true
nocleanup=true
stdout_logfile=/home/ubuntu/supervisord.out.log
stdout_logfile_maxbytes=32MB
stderr_logfile=/home/ubuntu/supervisord.err.log
stderr_logfile_maxbytes=32MB
startsecs=180
I don't think this config actually matters but posting anyway. I'm using the stock supervisor global config. I installed supervisor via standard sudo apt-get -y install supervisor
...and just to be sure:
$ sudo apt-get -y install supervisor
Reading package lists... Done
Building dependency tree
Reading state information... Done
supervisor is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 69 not upgraded.
However, when I try to start supervisor, I get a completely silent failure:
ubuntu@...:~$ sudo service supervisor start
ubuntu@...:~$
There is nothing in the logs (My global config has logfile=/var/log/supervisor/supervisord.log
) and there is nothing in the "program logs" either (logfile=/var/log/supervisor/supervisord.log.<stream>.log
).
I have a similar provisioning process for other servers that run ruby daemons so to dig in a bit further, I even creating a very simple ruby script and made chmod 777
the thing so there are no permission issues:
$ cat test.rb
while 1
puts "hi"
sleep 1
end
$ ruby test.rb
hi
hi
hi
...
My question is more of a ..."where should I look" question. If supervisor isn't logging anything the only other place I can think to look of is the syslog which doesn't indicate anything crazy to me.
Just a tip for others who may be struggling with this, try running the daemon directly
and you should actually see the errors that stop the supervisor from running. The supervisor init script is useless for hunting down the configuration errors.
The silent failure is due to this line failing:
in supervisor init script. It looks like for some reason supervisord was installed in
/usr/local/bin/
on this machine. Super annoying that nothing is printed...