Supervisor FATAl Exited too quastly (process log may have details(About inet_http_server and unix_http_server)

问题描述 投票:0回答:2

我写了一个 Django 项目,我用 supervisor 和 gunicorn

/etc/supervisor/conf.d/weather.conf

[group:weather_station]
programs=site

[program:site]
directory=$PROJECT
command=/home/nhcc/.local/bin/gunicorn -c /$PROJECT/weather_station/gunicorn.conf.py -p gunicorn.pod weather_station.wsgi
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor.log
environment=my-environment-variable
~

sudo supervisorctl reread

sudo supervisorctl reload

sudo supervisorctl status

显示错误

weather_station:site FATAL Exited too quickly (process log may have details)

所以我查看了日志文件:

/var/log/supervisor/supervisord.log

2017-09-08 17:15:25,000 CRIT Supervisor 以 root 身份运行(配置文件中没有用户)

2017-09-08 17:15:25,000 WARN 在解析期间包含额外文件“/etc/supervisor/conf.d/weather.conf”

2017-09-08 17:15:25,007 INFO RPC 接口“主管”已初始化

2017-09-08 17:15:25,008 CRIT 服务器“inet_http_server”在没有任何 HTTP 的情况下运行 身份验证

2017-09-08 17:15:25,008 信息 RPC 接口 'supervisor' 初始化

2017-09-08 17:15:25,008 CRIT 服务器“unix_http_server”在没有任何 HTTP 身份验证检查的情况下运行

2017-09-08 17:15:25,008 INFO supervisord 以 pid 32371 开始

2017-09-08 17:15:26,013 产生的信息:“站点”,pid 为 32447

2017-09-08 17:15:26,018 信息退出:站点(退出状态 127;未预期)

2017-09-08 17:15:27,022 产生的信息:“站点”,pid 为 32448

2017-09-08 17:15:27,026 信息退出:站点(退出状态 127;未预期)

2017-09-08 17:15:29,032 信息生成:“站点”,pid 为 32449

2017-09-08 17:15:29,038 信息退出:站点(退出状态 127;未预期)

2017-09-08 17:15:32,043 产生的信息:“站点”,pid 为 32451

2017-09-08 17:15:32,059 信息已退出:站点(退出状态 127;预计不会)

2017-09-08 17:15:33,060 信息放弃:站点也进入了致命状态 许多人开始重试太快了

根据

Included extra file

根据

Server 'unix_http_server' running without any HTTP authentication checking

我添加了两个部分 [unix_http_server] 和 [inet_http_server]

[unix_http_server]
file=/var/run/supervisor.sock   ; (the path to the socket file)
chmod=0766                 ; socket file mode (default 0700)
;chown=nobody:nogroup       ; socket file uid:gid owner
;username=user              ; (default is no username (open server))
;password=123               ; (default is no password (open server))

[inet_http_server]         ; inet (TCP) server disabled by default
port=*:9001        ; (ip_address:port specifier, *:port for all iface, 
;username=user              ; (default is no username (open server))
;password=123               ; (default is no password (open server))

这是当前的supervisor.conf

[unix_http_server]
file=/var/run/supervisor.sock   ; (the path to the socket file)
chmod=0766                 ; socket file mode (default 0700)

[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor            ; ('AUTO' child log dir, default $TEMP)

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL  for a unix socket

[inet_http_server]         ; inet (TCP) server disabled by default
port=*:9001        ;

[include]
files = /etc/supervisor/*.conf
files = /etc/supervisor/conf.d/*.conf

然后我跑了

sudo supervisord -c /etc/supervisor/supervisord.conf
sudo supervisorctl -c /etc/supervisor/supervisord.conf  

然后我跑

sudo supervisorctl reread

sudo supervisorctl reload

我又检查了日志

错误完全一样

有人知道为什么吗??

django linux gunicorn supervisord
2个回答
0
投票

尝试:

    # service supervisord stop
    # supervisord -c /etc/supervisor/supervisord.conf

然后检查状态:

    # supervisorctl status

-1
投票

您能否至少发布一个指向回购协议的链接?当您从从 Internet 复制的项目中发布一些随机错误消息时,别人怎么能找出您的配置错误的地方?您能否至少分享一下您为弄清楚如何运行克隆项目而不仅仅是发布错误消息所做的工作?

© www.soinside.com 2019 - 2024. All rights reserved.