Ran into additional issue with Supervisord.

Centos 6.5 supervisor python 2.6 installed with the OS python 2.7 installed in /usr/local/bin

supervisord program settings

command=python2.7 /opt/inf_api/inf_server.py --port=%(process_num)s
stderr_logfile = /var/log/supervisord/tornado-stderr.log
stdout_logfile = /var/log/supervisord/tornado-stdout.log

I can run inf_server.py with:

python2.7 inf_server.py --port=8080

with no problems. I made sure the files were executable (that was my problem before).

Any thoughts?

UPDATE: I cant get it to even launch a basic python script without failing. Started by commenting out the old program, adding a new one and then putting in:

command=python /opt/inf_api/test.py

where test.py just writes something to the screen and to a file. Fails with exit status 0. So I started adding back in the location of python (after discovering it with 'which python')


Tried putting the path in single quote, tried adding USER=root, to the environment, tried adding


tried adding


All the same thing, exit status 0. Nothing seems to added to any log files either, except what Im seeing from the debug of supervisord.

Man I am at a loss.

UPDATE 2: So there is absolutely NOTHING in the stderr and std out logs for this. It just fails with (Exit Status 1; not expected) no errors from the program I am trying to run, nothing...

2014-03-05 11:25:01,027 INFO spawned: 'inf_svr' with pid 15542
2014-03-05 11:25:01,315 INFO exited: inf_svr (exit status 1; not expected)
2014-03-05 11:25:01,315 INFO received SIGCLD indicating a child quit

Update 3: I have a simple python script started and managed by supervisord using /usr/local/bin/python 2.7 so at least I know it can invoke using the different version of python passed.

However I am still getting an (error status 1, not expected) on the original script.

I added in some exception logging, and even just some print to file lines at the beginning of the script. Its like it never even makes it there, fails before it even launches.


This turns out to be an issue with how Supervisord is catching error messages from python. As in it isnt. Im running it to launch a tornado app, that calls a second python file so it can spawn n instances of tornado servers. If there are errors in that second python app, then it isnt catching them and saving them to the log files. I tried all manner of methods but ended up having to catch them myself with try: except: and saving it to my own log files. Probably good paractice anyway but talk about a round about way of going about it.

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.