python – supervisord总是在WebFaction返回退出状态127
作者:互联网
在拖尾日志时,我不断从webFaction的supervisord获得以下错误:
INFO exited: my_app (exit status 127; not expected)
INFO gave up: my_app entered FATAL state, too many start retries too quickly
这是我的supervisord.conf:
[unix_http_server]
file=/home/btaylordesign/tmp/supervisord.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///home/btaylordesign/tmp/supervisord.sock
[supervisord]
logfile=/home/btaylordesign/tmp/supervisord.log
logfile_maxbytes=50MB
logfile_backups=5
loglevel=info
nodaemon=false
pidfile=/home/btaylordesign/tmp/supervisord.pid supervisord.pid
[program:my_app]
directory=/home/btaylordesign/webapps/my_app/my_app
command=celery worker -A my_app --concurrency=3 --loglevel=debug
我从supervisord.conf的同一目录开始监督:
$supervisord -c ./supervisord.conf
但我似乎无法找到正确的设置组合.我需要做三件事:
>在后台启动我的芹菜工人并让它们继续运转.
>部署代码时停止芹菜工作者.
>部署完成后重新启动芹菜工作者.
但是,在解决错误之前,我无法做任何事情.我究竟做错了什么?
解决方法:
退出代码127表示“未找到命令”:
http://www.tldp.org/LDP/abs/html/exitcodes.html
尝试将完整路径传递给celery命令:
command=/home/something/bin/celery worker -A my_app --concurrency=3 --loglevel=debug
另外,尝试在[program:x]部分中设置redirect_stderr和stdout_logfile选项以捕获错误消息并使调试更容易.
标签:python,celery,supervisord,webfaction 来源: https://codeday.me/bug/20190715/1466564.html