Child terminated with exit code 2 for running celeryd service in production
я использую celery версии 5.1.2 на Ubuntu 16.04 с python 3.8 и Django 3.0 .В моем производстве я не могу запустить задачи по расписанию.
вот мой /etc/systemd/celerd.conf
# Name of nodes to start
# here we have a single node
#CELERYD_NODES="w1"
CELERYD_NODES="worker1"
# or we could have three nodes:
#CELERYD_NODES="w1 w2 w3"
CELERY_APP="mcam"
# Absolute path to "manage.py"
# CELERY_BIN="/home/ravi/deploy/mcam/mcam/server/mcam/manage.py"
#CELERY_BIN="/home/ravi/.virtualenvs/lightdegree/bin/python manage.py celery"
CELERY_BIN="/home/ravi/.virtualenvs/lightdegree/bin/celery"
# How to call manage.py
CELERYD_MULTI="celery beat"
# Extra command-line arguments to the worker
# m3.medium instance has 1 vCPU. Hence the concurrency is limited to 2
CELERYD_OPTS="--time-limit=300 --concurrency=4"
# %N will be replaced with the first part of the nodename.
CELERYD_LOG_FILE="/var/log/celery/%N.log"
CELERYD_PID_FILE="/var/run/celery/%N.pid"
CELERYD_LOG_LEVEL="INFO"
это мой /etc/systemd/system/celeryd.service
[Unit]
Description=Celery Beat Service
After=network.target
Requires=gunicorn.service rabbitmq-server.service
[Service]
#Type=forking
User=ravi
Group=ravi
EnvironmentFile=/etc/systemd/celeryd.conf
WorkingDirectory=/home/ravi/deploy/mcam/server/mcam
#ExecStart=/home/ravi/.virtualenvs/lightdegree/bin/python manage.py celery -l debug -A mcam beat
ExecStart=/home/ravi/.virtualenvs/lightdegree/bin/celery multi start ${CELERYD_NODES} -A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} --logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}
#ExecStop=/home/ravi/.virtualenvs/lightdegree/bin/celery ${CELERY_BIN} multi stopwait ${CELERYD_NODES} \
# --pidfile=${CELERYD_PID_FILE}
ExecReload=/home/ravi/.virtualenvs/lightdegree/bin/celery ${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
вот команды, которые я использовал и ошибки, которые я получаю
sudo systemctl daemon-reload
sudo systemctl reset-failed celeryd.service
sudo systemctl restart celeryd
sudo systemctl status celeryd
● celeryd.service - Celery Beat Service
Loaded: loaded (/etc/systemd/system/celeryd.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Thu 2022-03-31 06:36:48 BST; 8s ago
Process: 17869 ExecStart=/home/ravi/.virtualenvs/lightdegree/bin/celery multi start ${CELERYD_NODES} -A ${CELERY_APP} --pidfile=${CELERYD_PID_
Main PID: 17869 (code=exited, status=0/SUCCESS)
Mar 31 06:36:47 ip-xxx systemd[1]: Started Celery Beat Service.
Mar 31 06:36:48 ip-xxx celery[17869]: celery multi v5.1.2 (sun-harmonics)
Mar 31 06:36:48 ip-xxx celery[17869]: > Starting nodes...
Mar 31 06:36:48 ip-xxx celery[17869]: > worker1@ip-xxx: OK
помогите, пожалуйста, как я планирую задачи, которые отлично работают на моем рабочем сервере