On Mon, May 7, 2012 at 7:33 PM, Aljoša Mohorović <[email protected]> wrote: > any known issues setting something like this for command: > command=source /path/to/some/profile && django-admin.py celeryd -l INFO > > where profile file contains something like: > ------------------------------------------- > cd /some/path/project/ > export PYTHONPATH=<paths required for django project to work>:$PYTHONPATH > export DJANGO_SETTINGS_MODULE=myproject.settings > source env/bin/activate > ------------------------------------------- > > and i'm getting this error: > celery_test-celery: ERROR (abnormal termination) > > log: > ------------------------------------------- > 2012-05-08 04:31:36,543 INFO exited: celery_test-celery (exit status > 127; not expected) > 2012-05-08 04:31:37,544 INFO gave up: celery_test-celery entered FATAL > state, too many start retries too quickly > ------------------------------------------- > > when called directly (". profile && django-admin.py celeryd -l INFO") > it works as expected. > any ideas? >
supervisord is not a shell, it's a process manager. you need to ensure that processes don't 'fork-away' from supervisord. calling a shell script which then calls runs a daemon (that might also break away) will not work. set the environment vars explicitly through supervisord. my preference is to find out whether env vars are actually needed, i try to replace them with cmd line args if i can? django-admin.py <cmd> is probably not going to work either. try running your cmd above, then run: 1. sudo su - <user> # where user is the user running celeryd 2. ps uxf # gives you a process tree, look to see what the process hanging off at the end is running on it's cmd line 3. cat /proc/<pid>/environ # dumps out key=val pairs, paste those into the environment line in your supervisord config good luck. > Aljosa Mohorovic > _______________________________________________ > 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
