ChisBread/chislash

使用supervisor管理服务后启动容器输出xxxx entered FATAL state, too many start retries too quickly

shoaky009 opened this issue · 5 comments

服务启动失败后进入容器内执行的日志

sh-5.0# ss -tulpn
Netid                  State                  Recv-Q                  Send-Q                                    Local Address:Port                                     Peer Address:Port                  Process                  
sh-5.0# supervisord 
/usr/lib/python3/dist-packages/supervisor/options.py:470: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  self.warnings.warn(
2023-01-09 01:43:27,009 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-01-09 01:43:27,010 INFO Included extra file "/etc/supervisord.d/clash.conf" during parsing
2023-01-09 01:43:27,010 INFO Included extra file "/etc/supervisord.d/exporter.conf" during parsing
2023-01-09 01:43:27,010 INFO Included extra file "/etc/supervisord.d/subconverter.conf" during parsing
2023-01-09 01:43:27,012 INFO supervisord started with pid 1725
2023-01-09 01:43:28,014 INFO spawned: 'exporter' with pid 1727
2023-01-09 01:43:28,016 INFO spawned: 'subconverter' with pid 1728
2023-01-09 01:43:28,017 INFO spawned: 'clash' with pid 1729
[chislash log] 启动规则文件服务...
[chislash log] 启动订阅转换服务...
[chislash log] 转换服务: http://172.16.1.132:25500/sub
[chislash log] 规则服务: http://172.16.1.132:8091/ACL4SSR/Clash/config/
[chislash log] 转换规则: http://172.16.1.132:8091/ACL4SSR/Clash/config/ACL4SSR_Online_Full.ini
[chislash log] 订阅已过期 重新订阅中...
[chislash log] Caught SIGTERM signal!
[chislash log] Tell the clash session to shut down.
2023-01-09 01:43:28,053 INFO exited: clash (exit status 0; not expected)
[chislash err] 订阅转换服务未能启动, 请检查端口是否被占用
2023-01-09 01:43:28,057 INFO exited: subconverter (exit status 1; not expected)
[chislash err] 规则文件服务未能启动, 请检查端口是否被占用
2023-01-09 01:43:28,058 INFO exited: exporter (exit status 1; not expected)
2023-01-09 01:43:29,061 INFO spawned: 'exporter' with pid 1857
2023-01-09 01:43:29,064 INFO spawned: 'subconverter' with pid 1858
2023-01-09 01:43:29,067 INFO spawned: 'clash' with pid 1859
[chislash log] 启动规则文件服务...
[chislash log] 启动订阅转换服务...
[chislash log] 转换服务: http://172.16.1.132:25500/sub
[chislash log] 规则服务: http://172.16.1.132:8091/ACL4SSR/Clash/config/
[chislash log] 转换规则: http://172.16.1.132:8091/ACL4SSR/Clash/config/ACL4SSR_Online_Full.ini
[chislash log] 订阅已过期 重新订阅中...
[chislash log] Caught SIGTERM signal!
[chislash log] Tell the clash session to shut down.
2023-01-09 01:43:29,104 INFO exited: clash (exit status 0; not expected)
[chislash err] 订阅转换服务未能启动, 请检查端口是否被占用
2023-01-09 01:43:29,104 INFO exited: subconverter (exit status 1; not expected)
[chislash err] 规则文件服务未能启动, 请检查端口是否被占用
2023-01-09 01:43:29,109 INFO exited: exporter (exit status 1; not expected)
^C2023-01-09 01:43:31,113 INFO spawned: 'exporter' with pid 1998
2023-01-09 01:43:31,117 INFO spawned: 'subconverter' with pid 1999
2023-01-09 01:43:31,120 INFO spawned: 'clash' with pid 2003
2023-01-09 01:43:31,121 WARN received SIGINT indicating exit request
2023-01-09 01:43:31,121 INFO waiting for exporter, subconverter, clash to die

已知的信息
1.有时候可以成功不过90%都是失败
2.确认过没有端口占用
3.按照顺序单独执行subconverter_service exporter_service clash_service是可以启动成功的
4.容器尝试过挂载/etc/supervisord.d修改subconverter和exporter对应配置的startsecs=1和startretries=0
5.在mac上和桌面windows可以正常部署启动成功,truenas上不行

环境信息
CPU:Intel(R) Xeon(R) Gold 6210U CPU @ 2.50GHz
Memory:128GiB
TrueNASVersion:TrueNAS-SCALE-22.12.0
DockerVersion:Docker version 20.10.18, build b40c2f6

感谢详细的反馈,我今天看一下这个问题

介意提供一下(容器内路径)这几个文件的内容吗?
记得屏蔽敏感信息,比如订阅链接

/etc/envinit.sh
/etc/clash/subconverter.log
/etc/clash/rulesexporter.log
sh-5.0# cat /etc/clash/rulesexporter.log
sh-5.0# cat /etc/clash/subconverter.log
2023/01/09 Mon 03:46:07.151502 [279 10739128][INFO] SubConverter v0.7.2 starting up..
\033]0;SubConverter v0.7.2\007\c
2023/01/09 Mon 03:46:07.153642 [279 10739128][INFO] Reading preference settings...
2023/01/09 Mon 03:46:07.173908 [279 10739128][INFO] Updating ruleset url 'rules/LocalAreaNetwork.list' with group '🎯 全球直连'.
2023/01/09 Mon 03:46:07.174078 [279 10739128][INFO] Updating ruleset url 'rules/MSServices.list' with group 'Ⓜ️ 微软服务'.
2023/01/09 Mon 03:46:07.174224 [279 10739128][INFO] Updating ruleset url 'rules/DivineEngine/Surge/Ruleset/Unbreak.list' with group '🎯 全球直连'.
2023/01/09 Mon 03:46:07.174343 [279 10739128][INFO] Updating ruleset url 'rules/NobyDa/Surge/AdRule.list' with group '🛑 全球拦截'.
2023/01/09 Mon 03:46:07.174652 [279 10739128][INFO] Updating ruleset url 'rules/DivineEngine/Surge/Ruleset/Guard/Hijacking.list' with group '🛑 全球拦截'.
2023/01/09 Mon 03:46:07.174817 [279 10739128][INFO] Updating ruleset url 'rules/DivineEngine/Surge/Ruleset/StreamingMedia/Video/Netflix.list' with group '🎥 NETFLIX'.
2023/01/09 Mon 03:46:07.174961 [279 10739128][INFO] Updating ruleset url 'rules/DivineEngine/Surge/Ruleset/StreamingMedia/Streaming.list' with group '🌍 国外媒体'.
sh-5.0# cat /etc/envinit.sh
export ENABLE_CLASH=1
export REQUIRED_CONFIG=
export CLASH_HTTP_PORT=7890
export CLASH_SOCKS_PORT=7891
export CLASH_TPROXY_PORT=7892
export CLASH_MIXED_PORT=7893
export DASH_PORT=8080
export DASH_PATH=/etc/clash/dashboard/public
export IP_ROUTE=0
export UDP_PROXY=0
export IPV6_PROXY=1
export PROXY_FWMARK=0x162
export PROXY_ROUTE_TABLE=0x162
export LOG_LEVEL=info
export SECRET=
export ENABLE_SUBCONV=1
export SUBCONV_URL=http://127.0.0.1:25500/sub
export SUBSCR_URLS=xxxxx
export SUBSCR_EXPR=86400
export REMOTE_CONV_RULE=http://127.0.0.1:8091/ACL4SSR/Clash/config/ACL4SSR_Online_Full.ini
export EXPORT_DIR_PORT=8091
export EXPORT_DIR_BIND=0.0.0.0
export NO_ENGLISH=true
export PREMIUM=true
sh-5.0# 

试试最新的镜像吧

试试最新的镜像吧

可以了多谢