Answer the question
In order to leave comments, you need to log in
Daemon for Celery systemd?
Good afternoon. setting up celery in production like this . I do everything according to the instructions, but the daemon does not start.
/etc/conf.d/celery
CELERYD_NODES="w1"
CELERY_BIN="/home/dikiigr/venv/posudahome/bin/celery"
CELERY_APP="shop"
CELERYD_MULTI="multi"
CELERYD_OPTS="--time-limit=300 --concurrency=8"
# - %n will be replaced with the first part of the nodename.
# - %I will be replaced with the current child process index
CELERYD_PID_FILE="/var/run/celery/%n.pid"
CELERYD_LOG_FILE="/var/log/celery/%n%I.log"
CELERYD_LOG_LEVEL="INFO"
[Unit]
Description=Celery Service
After=network.target
[Service]
Type=forking
User=dikiigr
Group=dikiigr
EnvironmentFile=-/etc/conf.d/celery
WorkingDirectory=/home/dikiigr/posudahome/engine
ExecStart=/bin/sh -c '${CELERY_BIN} multi start ${CELERYD_NODES} \
-A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
--logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}'
ExecStop=/bin/sh -c '${CELERY_BIN} multi stopwait ${CELERYD_NODES} \
--pidfile=${CELERYD_PID_FILE}'
ExecReload=/bin/sh -c '${CELERY_BIN} multi restart ${CELERYD_NODES} \
-A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
--logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}'
[Install]
WantedBy=multi-user.target
-- Unit celery.service has begun starting up.
Aug 04 13:58:08 posudahome.ru systemd[1]: celery.service: Control process exited, code=exited status
Aug 04 13:58:08 posudahome.ru systemd[1]: Failed to start Celery Service.
-- Subject: Unit celery.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit celery.service has failed.
--
-- The result is failed.
celery.service - Celery Service
Loaded: loaded (/etc/systemd/system/celery.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2017-08-04 14:28:24 UTC; 1min 7s ago
Process: 1593 ExecStop=/bin/sh -c ${CELERY_BIN} multi stopwait ${CELERYD_NODES} --pidfile=${CEL
Process: 1119 ExecStart=/bin/sh -c ${CELERY_BIN} multi start ${CELERYD_NODES} -A ${CELERY_APP}
Main PID: 1591 (code=exited, status=1/FAILURE)
~
Answer the question
In order to leave comments, you need to log in
As expected, permissions error. My user could not create files
CELERYD_PID_FILE="/var/run/celery/%n.pid"
CELERYD_LOG_FILE="/var/log/celery/%n%I.log"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question