On Mon, 2012-02-13 at 17:29 +0100, Robin Pellatt wrote: > Hi Folks, > > I'm trying to run the Trac standalone server (tracd) using supervisor, > with Nginx as the frontend. This is all working fine except that when > I try to restart Trac with "sudo supervisorctl restart trac", it > doesn't work. It starts a new process, but the old one is not cleanly > killed, and therefore the new process fails because the port it needs > is blocked.
http://supervisord.org/subprocess.html#nondaemonizing-of-subprocesses Make sure trac doesnt try to daemonize itself. I don't know how to tell you how to do this, because I don't use Trac, but it's almost certainly possible. - C > So the question is, how can I make sure the tracd process is really > killed when I tell supervisord to stop it? I've tried using the > pidproxy but this didn't help. Here's my current configuration: > > trac_run.sh > ---------------------- > #!/bin/bash > . bin/activate > tracd --port=9000 --auth="*,/srv/users.htdigest,XXXX trac" > --env-parent-dir=/srv/trac --pidfile=/var/run/tracd.9000 > > supervisor_trac.conf > ---------------------- > [program:trac] > command=/usr/bin/pidproxy /var/run/tracd.9000 /opt/trac/trac_run.sh > directory=/opt/trac > user=www-data > autostart=true > autorestart=true > stdout_logfile=/var/log/my.domain.com_supervisord.log > redirect_stderr=true > > > As you can see I'm running Trac from a virtualenv, I don't know if > this makes any difference. > > > Thanks for any help, > Cheers, > Robin > _______________________________________________ > Supervisor-users mailing list > [email protected] > http://lists.supervisord.org/mailman/listinfo/supervisor-users _______________________________________________ Supervisor-users mailing list [email protected] http://lists.supervisord.org/mailman/listinfo/supervisor-users
