Python监督错误:<class'ConnectionRefusedError'>

时间:2019-08-29 13:35:24

标签: python django celery supervisord

我正在尝试使用主管在后台运行芹菜任务。我愚弄了这个article来设置芹菜和主管。

但是,当我尝试运行以下命令时:

sudo supervisorctl reread

我遇到以下错误:

error: <class 'ConnectionRefusedError'>, [Errno 111] Connection refused: file: /usr/local/lib/python3.6/dist-packages/supervisor/xmlrpc.py line: 560

Conf文件

[program:my-app-celery]

command=path_to_project/venv/bin/celery --app=my_app.celery:app worker --loglevel=INFO
environment=PATH="/path_to_project/venv/bin:%(ENV_PATH)s"
directory=/path_to_project/
user=abcuser
numprocs=1
stdout_logfile=/path_to_project/log/celery-worker.log
stderr_logfile==/path_to_project/log/celery-worker.log
autostart=true
autorestart=true
startsecs=10

; Need to wait for currently executing tasks to finish at shutdown.
; Increase this if you have very long running tasks.
stopwaitsecs = 600

; When resorting to send SIGKILL to the program to terminate it
; send SIGKILL to its whole process group instead,
; taking care of its children as well.
killasgroup=true

; if rabbitmq is supervised, set its priority higher
; so it starts first
priority=998

我的环境详细信息:

Python 3.6.5

Django 1.11 (In a virtual environment)

supervisord --version
4.0.4

0 个答案:

没有答案