라즈베리가 두 개 있어요. 이전 버전은 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를 설치했지만 그 이후에는 아무것도 실행되거나 준비되지 않았습니다. 그래서 이전 Pi에서 새 Pi로 /lib/systemd/system/daemontools.service를 복사했습니다.
[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 restart는 아무것도 변경하지 않았습니다.
인사하고 감사합니다!