Skip to content

Commit 51aa6b3

Browse files
author
Ask Solem
committed
Cookbook: Daemonizing: Fixed typo CELERYD_LOGFILE/CELERYD_PIDFILE
-> CELERYD_LOG_FILE / CELERYD_PID_FILE Also added Troubleshooting section for the init scripts. Thanks to Vishal Rana
1 parent 999982c commit 51aa6b3

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

docs/cookbook/daemonizing.rst

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ daemonization tools.
99
:local:
1010

1111

12-
start-stop-daemon
13-
=================
12+
start-stop-daemon (Debian/Ubuntu/++)
13+
====================================
1414

1515
See the `contrib/debian/init.d/`_ directory in the celery distribution, this
1616
directory contains init scripts for celeryd and celerybeat.
@@ -68,10 +68,10 @@ Available options
6868
* CELERYD_CHDIR
6969
Path to chdir at start. Default is to stay in the current directory.
7070

71-
* CELERYD_PIDFILE
71+
* CELERYD_PID_FILE
7272
Full path to the pidfile. Default is /var/run/celeryd.pid.
7373

74-
* CELERYD_LOGFILE
74+
* CELERYD_LOG_FILE
7575
Full path to the celeryd logfile. Default is /var/log/celeryd.log
7676

7777
* CELERYD_LOG_LEVEL
@@ -167,6 +167,32 @@ Available options
167167
http://github.com/ask/celery/tree/master/contrib/supervisord/
168168
.. _`supervisord`: http://supervisord.org/
169169

170+
Trobuleshooting
171+
---------------
172+
173+
If you can't get the init scripts to work you should try running
174+
them in *verbose mode*::
175+
176+
$ sh -x /etc/init.d/celeryd start
177+
178+
This can reveal hints as to why the service won't start.
179+
180+
Also you will see the commands generated, you can try to run the celeryd
181+
command manually to read the resulting error output.
182+
183+
For example my ``sh -x`` output does this::
184+
185+
++ start-stop-daemon --start --chdir /opt/Opal/release/opal --quiet \
186+
--oknodo --background --make-pidfile --pidfile /var/run/celeryd.pid \
187+
--exec /opt/Opal/release/opal/manage.py celeryd -- --time-limit=300 \
188+
-f /var/log/celeryd.log -l INFO
189+
190+
Run the celeryd command after ``--exec`` (without the ``--``) to show the
191+
actual resulting output::
192+
193+
$ /opt/Opal/release/opal/manage.py celeryd --time-limit=300 \
194+
-f /var/log/celeryd.log -l INFO
195+
170196

171197
launchd (OS X)
172198
==============

0 commit comments

Comments
 (0)