我的Supervisord配置如下所示
abc@abc-adhocworker-c89d9667b-9lqbd:/app$ cat worker.conf
[supervisord]
logfile=/dev/null
pidfile=/tmp/supervisord.pid
nodaemon=true
[unix_http_server]
file = /tmp/supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:worker]
command=./manage.py rq worker %(ENV_QUEUES)s
process_name=%(program_name)s-%(process_num)s
numprocs=%(ENV_WORKERS_COUNT)s
directory=/app
stopsignal=TERM
autostart=true
autorestart=true
startsecs=300
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[eventlistener:worker_healthcheck]
autorestart=true
serverurl=AUTO
command=./manage.py rq healthcheck
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
events=TICK_60
收到此错误
Error: .ini file does not include supervisorctl section
For help, use /usr/local/bin/supervisorctl -h
我尝试添加上述配置
[supervisorctl]
serverurl=http://127.0.0.1:9001
然后在运行supervisorctl status时收到错误
abc@abc-adhocworker-c89d9667b-9lqbd:/app$ /usr/local/bin/python /usr/local/bin/supervisorctl status
error: <class 'OSError'>, [Errno 99] Cannot assign requested address: file: /usr/local/lib/python3.7/socket.py line: 716
还试着把它改成
serverurl=unix:///tmp/supervisor.sock
不确定更改配置后是否需要重新启动/重新加载supervisord?
注意:我在Docker容器中运行这些命令。
1条答案
按热度按时间3vpjnl9f1#
运行监督控制状态
exec
执行-c
指定supervisord
配置确保添加
supervisorctl
部分serverurl
,套接字文件在supervisord.conf
中的位置(在我的例子中,它被命名为worker.conf
)