pardon me as this is my first time attempting to write a init script for centos 5.
I am using django + supervisor to manage my celery workers, scheduler.
Now, this is my naive simple attempt /etc/init.d/supervisor
#!/bin/sh
#
# /etc/rc.d/init.d/supervisord
#
# Supervisor is a client/server system that
# allows its users to monitor and control a
# number of processes on UNIX-like operating
# systems.
#
# chkconfig: - 64 36
# description: Supervisor Server
# processname: supervisord
# Source init functions
/home/foo/virtualenv/property_env/bin/python /home/foo/bar/manage.py supervisor --daemonize
inside my supervisor.conf:
[program:celerybeat]
command=/home/property/virtualenv/property_env/bin/python manage.py celerybeat --loglevel=INFO --logfile=/home/property/property_buyer/logfiles/celerybeat.log
[program:celeryd]
command=/home/foo/virtualenv/property_env/bin/python manage.py celeryd --loglevel=DEBUG --logfile=/home/foo/bar/logfiles/celeryd.log --concurrency=1 -E
[program:celerycam]
command=/home/foo/virtualenv/property_env/bin/python manage.py celerycam
I couldn't get it to work.
2013-08-06 00:21:03,108 INFO exited: celerybeat (exit status 2; not expected)
2013-08-06 00:21:06,114 INFO spawned: 'celeryd' with pid 11772
2013-08-06 00:21:06,116 INFO spawned: 'celerycam' with pid 11773
2013-08-06 00:21:06,119 INFO spawned: 'celerybeat' with pid 11774
2013-08-06 00:21:06,146 INFO exited: celerycam (exit status 2; not expected)
2013-08-06 00:21:06,147 INFO gave up: celerycam entered FATAL state, too many start retries too quickly
2013-08-06 00:21:06,147 INFO exited: celeryd (exit status 2; not expected)
2013-08-06 00:21:06,152 INFO gave up: celeryd entered FATAL state, too many start retries too quickly
2013-08-06 00:21:06,152 INFO exited: celerybeat (exit status 2; not expected)
2013-08-06 00:21:07,153 INFO gave up: celerybeat entered FATAL state, too many start retries too quickly
I believe it is the init script, but please help me understand what is wrong.