Hello there, I just started trying out supervisord. It looks quite
nifty, but I've run into a couple issues. I'm attaching a config file
and a test program.

If I use the config file as is, I get the traceback below,
which I have snipped and sanitized.

Looking at the traceback, it doesn't appear to be possible
to use substitution keys like 'program_name' as indicated
in the docs, except for 'here'.

If I comment out stdout_logfile, then the supervisor will
start ok. Then, if I use supervisorctl to reload the process,
it works ok the first time. But if I reload it again, the
supervisor crashes. A little poking around with some logging
statements seems to indicate that during the second time around,
the logging object is using file descriptor 2 and this gets closed
during daemonize().

thanks,
dave

Traceback (most recent call last):
  <snip>
  File "/blah/blah/supervisor/datatypes.py", line 228, in existing_dirpath
    nv = v % {'here':here}
KeyError: 'program_name'
#!/usr/bin/env python

import sys, time

while True:
    print 'hello'
    sys.stdout.flush()
    print >>sys.stderr, "Hello"
    time.sleep(1)

[unix_http_server]
file=/tmp/supervisor.sock   ; (the path to the socket file)

[supervisord]

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock

[program:test]
command=/tmp/test
stdout_logfile=/tmp/%(program_name)s.log
_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to