title: Supervisord (exit status 1; not expected) centos python
body: <p>Ran into additional issue with Supervisord.</p>
  
  <p>Centos 6.5
  supervisor
  python 2.6 installed with the OS
  python 2.7 installed in /usr/local/bin</p>
  
  <p>supervisord program settings</p>
  
  <pre><code>[program:inf_svr]
  process_name=inf_svr%(process_num)s
  directory=/opt/inf_api/
  environment=USER=root,PYTHONPATH=/usr/local/bin/
  command=python2.7 /opt/inf_api/inf_server.py --port=%(process_num)s
  startsecs=2
  user=root
  autostart=true
  autorestart=true
  numprocs=4
  numprocs_start=8080
  stderr_logfile = /var/log/supervisord/tornado-stderr.log
  stdout_logfile = /var/log/supervisord/tornado-stdout.log
  </code></pre>
  
  <p>I can run inf_server.py with:</p>
  
  <pre><code>python2.7 inf_server.py --port=8080
  </code></pre>
  
  <p>with no problems.
  I made sure the files were executable (that was my problem before).</p>
  
  <p>Any thoughts?</p>
  
  <p>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:</p>
  
  <pre><code>command=python /opt/inf_api/test.py
  </code></pre>
  
  <p>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')</p>
  
  <pre><code>environment=PYTHONPATH=/usr/bin
  </code></pre>
  
  <p>Tried putting the path in single quote, tried adding USER=root, to the environment, tried adding</p>
  
  <pre><code>directory=opt/inf_api/
  </code></pre>
  
  <p>tried adding </p>
  
  <pre><code>user=root
  </code></pre>
  
  <p>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.</p>
  
  <p>Man I am at a loss.</p>