I'm still working on test deploying a tg app using supervisor 2. I've 
gone through the docs and the great blog post here:
http://paddyland.serveblog.net/article/13

Now to the fun part. I am trying to run my app as the user www-data 
(debian based web user). I have made sure that all files are owned by 
myuser:www-data and chmod 775.

My supervisor config looks like:
[program:tg-avw]
command=/usr/bin/python2.4 /home/rharding/src/tg-avw/start-avwsystems.py 
/home/rharding/src/tg-avw/prod.cfg
autorestart=true
autostart=true
user=www-data
logfile=/var/log/tg-avw-supervisor.log
logfile_maxbytes=50MB
logfile_backups=10
startsecs=10

What works:
if I su to the www-data user and run the command the cherrypy server 
starts and all is well.
if I run as root supervisord -n (and keep it in the foreground) 
everything starts up through supervisor well.

[EMAIL PROTECTED]:~/src/tg-avw$ sudo supervisord -n
2007-02-16 10:41:04,825 CRIT Supervisor running as root (no user in 
config file)
2007-02-16 10:41:04,843 INFO 127.0.0.1:Medusa (V1.1.1.1) started at Fri 
Feb 16 10:41:04 2007
        Hostname: localhost
        Port:9001
2007-02-16 10:41:04,921 INFO supervisord started with pid 13411
2007-02-16 10:41:04,939 INFO spawned: 'tg-avw' with pid 13412
2007-02-16 10:41:14,939 INFO success: tg-avw entered RUNNING state, 
process has stayed up for > than 10 seconds (startsecs)


If I don't start supervisor in the foreground I get errors, if I try to 
start it from the /etc/init.d/supervisor it bombs as well. This is the 
log output I get on debug level:
2007-02-16 10:41:26,534 CRIT Supervisor running as root (no user in 
config file)
2007-02-16 10:41:26,552 INFO 127.0.0.1:Medusa (V1.1.1.1) started at Fri 
Feb 16 10:41:26 2007
        Hostname: localhost
        Port:9001
2007-02-16 10:41:26,626 INFO daemonizing the process
2007-02-16 10:41:26,627 INFO set current directory: '/'
2007-02-16 10:41:26,627 INFO supervisord started with pid 13446
2007-02-16 10:41:26,632 DEBG supervisord forked; parent exiting
2007-02-16 10:41:26,636 INFO spawned: 'tg-avw' with pid 13447
2007-02-16 10:41:27,608 INFO exited: tg-avw (exit status 1; not expected)
2007-02-16 10:41:27,609 DEBG received SIGCLD indicating nothing
2007-02-16 10:41:28,616 INFO spawned: 'tg-avw' with pid 13456
2007-02-16 10:41:29,520 INFO exited: tg-avw (exit status 1; not expected)
2007-02-16 10:41:29,521 DEBG received SIGCLD indicating nothing
2007-02-16 10:41:31,530 INFO spawned: 'tg-avw' with pid 13457
2007-02-16 10:41:32,441 INFO exited: tg-avw (exit status 1; not expected)
2007-02-16 10:41:32,441 DEBG received SIGCLD indicating nothing
2007-02-16 10:41:35,449 INFO spawned: 'tg-avw' with pid 13463
2007-02-16 10:41:36,302 INFO exited: tg-avw (exit status 1; not expected)
2007-02-16 10:41:36,303 DEBG received SIGCLD indicating nothing
2007-02-16 10:41:37,301 INFO gave up: tg-avw entered FATAL state, too 
many start retries too quickly


I can't get any info on why it runs if I do foreground, and not if I 
just let it daemonize. Any ideas?

Thanks for the help.

Rick

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to