Created
April 26, 2012 16:48
-
-
Save bradmontgomery/2500919 to your computer and use it in GitHub Desktop.
Supervisord is running, but not launching programs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@myhost:~# supervisorctl version | |
3.0a8 | |
root@myhost:~# which supervisorctl | |
/usr/bin/supervisorctl | |
root@myhost:~# which supervisord | |
/usr/bin/supervisord | |
root@myhost:~# supervisorctl status # NOTE that there's no output! | |
root@myhost:~# supervisorctl avail | |
root@myhost:~# service supervisor status | |
is running | |
root@myhost:~# ps aux | grep supervisor | |
root 21740 0.1 0.4 40772 10056 ? Ss 11:28 0:00 /usr/bin/python /usr/bin/supervisord | |
root 21749 0.0 0.0 7624 932 pts/2 S+ 11:28 0:00 grep --color=auto supervisor | |
root@myhost:~# cat /var/log/supervisor/supervisord.log | |
2012-04-26 11:28:22,483 CRIT Supervisor running as root (no user in config file) | |
2012-04-26 11:28:22,536 INFO RPC interface 'supervisor' initialized | |
2012-04-26 11:28:22,536 WARN cElementTree not installed, using slower XML parser for XML-RPC | |
2012-04-26 11:28:22,536 CRIT Server 'unix_http_server' running without any HTTP authentication checking | |
2012-04-26 11:28:22,539 INFO daemonizing the supervisord process | |
2012-04-26 11:28:22,539 INFO supervisord started with pid 21740 | |
root@myhost:~# | |
root@myhost:~# ll /etc/supervisor/conf.d/ | |
total 28 | |
drwxr-xr-x 2 root root 4096 2012-04-26 11:31 ./ | |
drwxr-xr-x 3 root root 4096 2012-04-25 18:38 ../ | |
-rw-r--r-- 1 root root 66 2012-04-26 11:31 sample.conf | |
root@myhost:~# | |
root@myhost:~# ll /opt/sample/ | |
total 12 | |
drwxr-xr-x 2 root root 4096 2012-04-26 11:32 ./ | |
drwxr-xr-x 4 root root 4096 2012-04-26 11:31 ../ | |
-rwxr-xr-x 1 root root 97 2012-04-26 11:32 run.sh* | |
root@myhost:~# | |
root@myhost:~# cat /opt/sample/run.sh | |
#!/bin/bash | |
while true; do | |
T=`date` | |
echo "[$T] Running!" >> /var/log/sample.log | |
sleep 1 | |
done | |
root@myhost:~# | |
root@myhost:~# python | |
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) | |
[GCC 4.4.3] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; /etc/supervisor/conf.d/sample.conf | |
[program:sample] | |
directory=/opt/sample | |
command=/opt/sample/run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; /etc/supervisor/supervisord.conf | |
[unix_http_server] | |
chmod=0700 | |
file=/var/run/supervisor.sock | |
[supervisord] | |
logfile=/var/log/supervisor/supervisord.log | |
childlogdir=/var/log/supervisor | |
pidfile=/var/run/supervisord.pid | |
[rpcinterface:supervisor] | |
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface | |
[supervisorctl] | |
serverurl=unix:///var/run/supervisor.sock | |
[include] | |
files = /etc/supervisor/conf.d/*.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment