how do i write an init script for django-supervisor
Posted
by
amateur
on Server Fault
See other posts from Server Fault
or by amateur
Published on 2013-08-05T16:23:46Z
Indexed on
2014/05/28
21:34 UTC
Read the original article
Hit count: 462
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.
© Server Fault or respective owner