Как решить мою проблему ниже, ошибка установки производства сельдерея - PullRequest
0 голосов
/ 21 апреля 2020

Привет, я пытаюсь настроить django и сельдерей в производстве.

Вот мой файл /etc/conf.d/celery.

CELERYD_NODES="w1"
CELERY_BIN="/home/.../env/bin/celery"


CELERY_APP="projectname"

# How to call manage.py
CELERYD_MULTI="multi"

# Extra command-line arguments to the worker
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
#   and is important when using the prefork pool to avoid race conditions.
CELERYD_PID_FILE="/var/run/balu/%n.pid"
CELERYD_LOG_FILE="/var/log/balu/%n%I.log"
CELERYD_LOG_LEVEL="INFO"

Вот мой файл celery.service

[Unit]
Description=Celery Service
After=network.target

[Service]
Type=forking
User=balu
Group=balu
EnvironmentFile=/etc/conf.d/celery
WorkingDirectory=/home/.../projecttitle
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

Я перезапустил sudo systemctl daemon-reload, и когда я пытаюсь запустить celery, я получаю такую ​​ошибку.

Работа для сельдерея. Сбой службы, поскольку процесс управления завершен с кодом ошибки. См. Подробности "systemctl status celery.service" и "journalctl -xe".

Вот полный список состояний ошибок

● celery.service - Celery Service
   Loaded: loaded (/etc/systemd/system/celery.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-04-21 10:13:02 IST; 10s ago
  Process: 10601 ExecStart=/bin/sh -c ${CELERY_BIN} multi start ${CELERYD_NODES}    -A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE}   

Apr 21 10:13:02 balu-Inspiron-14-3467 systemd[1]: Starting Celery Service...
Apr 21 10:13:02 balu-Inspiron-14-3467 systemd[1]: celery.service: Control process exited, code=exited status=126
Apr 21 10:13:02 balu-Inspiron-14-3467 systemd[1]: celery.service: Failed with result 'exit-code'.
Apr 21 10:13:02 balu-Inspiron-14-3467 systemd[1]: Failed to start Celery Service.

Любая помощь ??? заранее спасибо

...