archery entered FATAL state, too many start retries too quickly
#################################
一、配置文件:supervisord.conf
(venv) [root@wy3-db245 archery]# cat supervisord.conf
[unix_http_server]
file=supervisor.sock
[supervisord]
logfile=logs/supervisord.log
nodaemon=false
[supervisorctl]
serverurl=unix://supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface
[program:archery]
command=gunicorn -w 4 -b 127.0.0.1:8888 --timeout 600 archery.wsgi:application
autorestart=true
stopasgroup=true
killasgroup=true
redirect_stderr=true
[program:qcluster]
command=python manage.py qcluster
autorestart=true
stopasgroup=true
killasgroup=true
redirect_stderr=true
(venv) [root@wy3-db245 archery]#
二、archery启动脚本:startup.sh
(venv) [root@wy3-db245 archery]# cat startup.sh
#!/bin/bash
# 收集所有的静态文件到STATIC_ROOT
python3 manage.py collectstatic -v0 --noinput
# 启动服务
supervisord -c supervisord.conf
三、supervisor日志文件:
(venv) [root@wy3-db245 archery]# cat logs/supervisord.log
2023-04-10 20:51:58,771 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2023-04-10 20:51:58,771 WARN For [program:archery], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2023-04-10 20:51:58,771 WARN For [program:qcluster], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2023-04-10 20:51:59,080 INFO RPC interface 'supervisor' initialized
2023-04-10 20:51:59,080 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2023-04-10 20:51:59,085 INFO daemonizing the supervisord process
2023-04-10 20:51:59,087 INFO supervisord started with pid 15203
2023-04-10 20:52:00,092 INFO spawnerr: unknown error making dispatchers for 'archery': EISDIR
2023-04-10 20:52:00,096 INFO spawned: 'qcluster' with pid 15205
2023-04-10 20:52:01,101 INFO spawnerr: unknown error making dispatchers for 'archery': EISDIR
2023-04-10 20:52:01,101 INFO success: qcluster entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-04-10 20:52:03,571 INFO spawnerr: unknown error making dispatchers for 'archery': EISDIR
2023-04-10 20:52:06,577 INFO spawnerr: unknown error making dispatchers for 'archery': EISDIR
2023-04-10 20:52:06,577 INFO gave up: archery entered FATAL state, too many start retries too quickly
2023-04-10 20:55:57,540 INFO waiting for qcluster to stop
2023-04-10 20:55:57,796 INFO stopped: qcluster (exit status 0)
2023-04-10 21:24:48,003 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2023-04-10 21:24:48,003 WARN For [program:archery], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2023-04-10 21:24:48,003 WARN For [program:qcluster], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2023-04-10 21:24:48,313 INFO RPC interface 'supervisor' initialized
2023-04-10 21:24:48,313 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2023-04-10 21:24:48,318 INFO daemonizing the supervisord process
2023-04-10 21:24:48,320 INFO supervisord started with pid 17365
2023-04-10 21:24:49,325 INFO spawnerr: unknown error making dispatchers for 'archery': EISDIR
2023-04-10 21:24:49,329 INFO spawned: 'qcluster' with pid 17367
2023-04-10 21:24:50,333 INFO spawnerr: unknown error making dispatchers for 'archery': EISDIR
2023-04-10 21:24:50,334 INFO success: qcluster entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-04-10 21:24:52,722 INFO spawnerr: unknown error making dispatchers for 'archery': EISDIR
2023-04-10 21:24:55,727 INFO spawnerr: unknown error making dispatchers for 'archery': EISDIR
2023-04-10 21:24:55,727 INFO gave up: archery entered FATAL state, too many start retries too quickly
2023-04-10 21:39:11,739 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2023-04-10 21:39:11,739 WARN For [program:archery], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2023-04-10 21:39:11,739 WARN For [program:qcluster], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2023-04-10 21:39:12,049 INFO RPC interface 'supervisor' initialized
2023-04-10 21:39:12,049 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2023-04-10 21:39:12,054 INFO daemonizing the supervisord process
2023-04-10 21:39:12,056 INFO supervisord started with pid 18342
2023-04-10 21:39:13,060 INFO spawnerr: unknown error making dispatchers for 'archery': EISDIR
2023-04-10 21:39:13,064 INFO spawned: 'qcluster' with pid 18344
2023-04-10 21:39:14,069 INFO spawnerr: unknown error making dispatchers for 'archery': EISDIR
2023-04-10 21:39:14,069 INFO success: qcluster entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-04-10 21:39:16,073 INFO spawnerr: unknown error making dispatchers for 'archery': EISDIR
2023-04-10 21:39:19,689 INFO spawnerr: unknown error making dispatchers for 'archery': EISDIR
2023-04-10 21:39:19,689 INFO gave up: archery entered FATAL state, too many start retries too quickly
解决办法:
1.放弃supervisor这个玩意
python manage.py qcluster
gunicorn -w 4 -b 127.0.0.1:8888 --timeout 600 archery.wsgi:application
2.正确利用supervisor
暂时没时间去了解
#######################################
igoodful@qq.com