daemontools 不再作为服务启动:启动请求重复得太快

daemontools 不再作为服务启动:启动请求重复得太快

我有两个覆盆子。旧的运行 Raspbian/Debin 4.9.35+,新的运行 5.15.32。在旧版本上,我的 daemontools 可以顺利工作,并且在重新启动后也可以顺利启动 MyService:

$ systemctl status daemontools.service 
● daemontools.service - Daemontools service supervision
   Loaded: loaded (/lib/systemd/system/daemontools.service; enabled)
   Active: active (running) since Sa 2022-07-30 19:23:19 CEST; 21h ago
 Main PID: 368 (svscanboot)
   CGroup: /system.slice/daemontools.service
           ├─368 /bin/sh /usr/bin/svscanboot /etc/service/
           ├─379 svscan /etc/service
           ├─380 readproctitle service errors: .... "Morgens"=830 und "abends"=2127 31.07. 16:23:56 INFO  - [eg-...
           ├─384 supervise myProg
           └─386 java -Duser.timezone=Europe/Berlin -Dfile.encoding=UTF-8 -jar myProg....

在新机器上,我使用 agt-get 安装了 daemontools,但之后没有任何运行或准备。所以我将 /lib/systemd/system/daemontools.service 从旧的 Pi 复制到了新的 Pi。

[Unit]
Description=Daemontools service supervision

[Service]
ExecStart=/usr/bin/svscanboot /etc/service/
Restart=always

[Install]
WantedBy=multi-user.target

然后我“启用”该服务并启动它并收到错误:

pi@jc04:~ $ systemctl status daemontools.service 
● daemontools.service - Daemontools service supervision
     Loaded: loaded (/lib/systemd/system/daemontools.service; enabled; vendor preset: enabled)
     Active: failed (Result: start-limit-hit) since Sun 2022-07-31 16:08:34 CEST; 16min ago
   Main PID: 1084 (code=exited, status=0/SUCCESS)
        CPU: 43ms

Jul 31 16:08:34 jc04 systemd[1]: daemontools.service: Scheduled restart job, restart counter is at 5.
Jul 31 16:08:34 jc04 systemd[1]: Stopped Daemontools service supervision.
Jul 31 16:08:34 jc04 systemd[1]: daemontools.service: Start request repeated too quickly.
Jul 31 16:08:34 jc04 systemd[1]: daemontools.service: Failed with result 'start-limit-hit'.
Jul 31 16:08:34 jc04 systemd[1]: Failed to start Daemontools service supervision.

使用journalctl会带来以下结果:

journalctl -u daemontools.service
-- Journal begins at Mon 2022-04-04 14:17:02 CEST, ends at Sun 2022-07-31 16:29:31 CEST. --
Jul 31 16:02:34 jc04 systemd[1]: Started Daemontools service supervision.
Jul 31 16:02:34 jc04 systemd[1]: daemontools.service: Succeeded.
Jul 31 16:02:34 jc04 systemd[1]: daemontools.service: Scheduled restart job, restart counter is at 1.
Jul 31 16:02:34 jc04 systemd[1]: Stopped Daemontools service supervision.
Jul 31 16:02:34 jc04 systemd[1]: Started Daemontools service supervision.
Jul 31 16:02:34 jc04 systemd[1]: daemontools.service: Succeeded.
Jul 31 16:02:34 jc04 systemd[1]: daemontools.service: Scheduled restart job, restart counter is at 2.
Jul 31 16:02:34 jc04 systemd[1]: Stopped Daemontools service supervision.
Jul 31 16:02:35 jc04 systemd[1]: Started Daemontools service supervision.
Jul 31 16:02:35 jc04 systemd[1]: daemontools.service: Succeeded.
Jul 31 16:02:35 jc04 systemd[1]: daemontools.service: Scheduled restart job, restart counter is at 3.
Jul 31 16:02:35 jc04 systemd[1]: Stopped Daemontools service supervision.
Jul 31 16:02:35 jc04 systemd[1]: Started Daemontools service supervision.
Jul 31 16:02:35 jc04 systemd[1]: daemontools.service: Succeeded.
Jul 31 16:02:35 jc04 systemd[1]: daemontools.service: Scheduled restart job, restart counter is at 4.
Jul 31 16:02:35 jc04 systemd[1]: Stopped Daemontools service supervision.
Jul 31 16:02:35 jc04 systemd[1]: Started Daemontools service supervision.
Jul 31 16:02:35 jc04 systemd[1]: daemontools.service: Succeeded.
Jul 31 16:02:35 jc04 systemd[1]: daemontools.service: Scheduled restart job, restart counter is at 5.
Jul 31 16:02:35 jc04 systemd[1]: Stopped Daemontools service supervision.
Jul 31 16:02:35 jc04 systemd[1]: daemontools.service: Start request repeated too quickly.
Jul 31 16:02:35 jc04 systemd[1]: daemontools.service: Failed with result 'start-limit-hit'.
Jul 31 16:02:35 jc04 systemd[1]: Failed to start Daemontools service supervision.

在我看来,好像 daemontools 启动并立即完成,持续了 5 次,然后 initd 打破了循环。为什么新发动机会出现这种情况,为什么同样的结构在旧发动机上却有魅力? PS:daemon-reload和egine重启没有改变任何东西。

问候并谢谢您!

相关内容