Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got supervisord 3.0a8 installed from the system package on ubuntu 10.04 (64bit). The supervisor service appears to be running, but it's not launching the configured programs. Interestingly enough, this exact configuration is running on another system, and is working as expected.

The main config file looks like this:

; /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

A sample program config looks like this:

; /etc/supervisor/conf.d/sample.conf 
[program:sample]
directory=/opt/sample
command=/opt/sample/run.sh

Where, the /opt/sample/run.sh is:

#!/bin/bash

while true; do
    T=`date`
    echo "[$T] Running!" >> /var/log/sample.log
    sleep 1
done

And, here's some additional information regarding the running instance of supervisord:

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:~# 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:~# 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:~# 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.
>>> 

Any help is greatly appreciated!

share|improve this question
1  
What happens when you drop into the supervisorctl shell? Just run supervisorctl with no args. –  Benjamin W. Smith Apr 26 '12 at 18:32
    
I get the same results as when providing arguments to supervisorctl. –  Brad Montgomery Apr 27 '12 at 21:02
    
Does /opt/sample/run.sh have the executable bit set? –  Dan Garthwaite May 30 at 14:31
    
It did, indeed, Dan (you can see this in the output above: -rwxr-xr-x 1 root root 97 2012-04-26 11:32 run.sh*). And run.sh also did what I expected it to when I ran it by itself. –  Brad Montgomery Jun 7 at 20:53
    
How goes this battle? –  Dan Garthwaite Dec 18 at 15:48

3 Answers 3

I would add

loglevel=debug

to [supervisord] section. It might help. It seems include doesn't work. supervisorctl status should display your script running.

share|improve this answer

try running with the -n option and it send debug commands right to the command line. Eases the debugging process.

Are the systems exact copies, ie are the virtual clones of each other? Check that the file is executable just to be sure, that has foiled me in the past with supervisord.

share|improve this answer
    
It's been a while since I asked this question, but both machines were provisioned and configured with Chef using the same recipes, so I'm guessing they were very similar if not exact. The simple run.sh file was also executable. I never solved this :( Thanks for your input! –  Brad Montgomery Mar 5 at 2:09
    
Im running into a similar problem on Centos6.5. For the life of me I cant get it to stay up. According to the limit docs its something to do with the environemnt settings but Im running as root, have tried all manner of environment settings and the results are the same (exit status 1). If I figure it out Ill let you know - ya 2012 was a while ago.... –  Michael Mar 5 at 16:27

This happens to me when I forget to sudo supervisorctl update.

Also, does /opt/sample/run.sh have the executable bit set?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.