0

I've got two Raspberries. An old one running Raspbian/Debin 4.9.35+ and a new one, running 5.15.32. On the old one, I have daemontools working smoothly and starting MyService smoothly as well upon reboot:

$ 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....

On the new one I've installed daemontools with agt-get, but after that there is nothing running or prepared. So I've copied /lib/systemd/system/daemontools.service from the old to the new Pi.

[Unit]
Description=Daemontools service supervision

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

[Install]
WantedBy=multi-user.target

Then I "enabled" the service and started it and receive an error:

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.

Using journalctl brings the following:

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.

Looks to me, as if daemontools starts and immediately finishes and that for 5 times and then initd breaks the circle. Why does that happen on the new engine and why does the same construction work like a charm on the old one? PS: daemon-reload and egine reboot didn't chaneg anything.

Regards and Thank you!

fbstov
  • 9
  • 2
  • Any specific reason for using daemontools in addition to systemd, and not configuring those services to be started via systemd directly? – u1686_grawity Jul 31 '22 at 17:05
  • Yes: http://cr.yp.to/daemontools/faq/create.html#why – fbstov Sep 25 '22 at 09:22
  • That FAQ section doesn't mention anything about systemd though, but it would seem that systemd satisfies all items in the table in the same way as /service does. – u1686_grawity Sep 25 '22 at 09:36

0 Answers0