>>> Michael Chapman <mike@xxxxxxxxxxxxxxxxx> schrieb am 03.06.2019 um 10:44 in Nachricht <alpine.LFD.2.21.1906031830420.3180@xxxxxxxxxx>: > On Mon, 3 Jun 2019, Ulrich Windl wrote: >> Hi! >> >> When installing a test package, I noticed that one unit >> (iotwatch-generator.service) triggered a restart for an unknown reason. The >> status is (note: no reason for restart shown): >> >> # systemctl status iotwatch-generator.service -l >> ● iotwatch-generator.service - I/O performance monitor instance generator >> Loaded: loaded (/usr/lib/systemd/system/iotwatch-generator.service; >> enabled; vendor preset: disabled) >> Active: failed (Result: start-limit) since Mon 2019-06-03 09:41:18 CEST; >> 5min ago >> Docs: man:iotwatch-generator(8) >> man:iotwatch@.service(8) >> Process: 29133 ExecStart=/usr/lib/iotwatch/iotwatch-generator >> /run/systemd/system (code=exited, status=0/SUCCESS) >> Main PID: 29133 (code=exited, status=0/SUCCESS) >> >> Jun 03 09:41:18 v04 systemd[1]: Starting I/O performance monitor instance >> generator... >> Jun 03 09:41:18 v04 systemd[1]: Started I/O performance monitor instance >> generator. >> Jun 03 09:41:22 v04 systemd[1]: iotwatch-generator.service: Start request >> repeated too quickly. >> Jun 03 09:41:22 v04 systemd[1]: Failed to start I/O performance monitor >> instance generator. >> Jun 03 09:41:22 v04 systemd[1]: iotwatch-generator.service: Unit entered >> failed state. >> Jun 03 09:41:22 v04 systemd[1]: iotwatch-generator.service: Failed with > result >> 'start-limit'. >> >> So there was a successful start, but then some spurious restart. Why? > > It'd probably be easier if you supplied us with these units' > configurations. My distribution does not ship iotwatch@.service or > iotwatch-generator.service units. Hi! The generator unit is: [Unit] Description=I/O performance monitor instance generator Documentation=man:iotwatch-generator(8) man:iotwatch@.service(8) Wants=nss-user-lookup.target time-sync.target paths.target After=nss-user-lookup.target time-sync.target paths.target ConditionPathExists=/etc/iotwatch.conf Conflicts=shutdown.target [Service] Type=oneshot ExecStart=/usr/lib/iotwatch/iotwatch-generator /run/systemd/system TimeoutStartSec=10 RestartPreventExitStatus=2 3 4 5 StartLimitBurst=1 [Install] WantedBy=default.target iotwatch.target The iotwatch.target is: [Unit] Description=iotwatch I/O performance monitor Documentation=man:iotwatch@.service(8) man:iotwatch-generator(8) After=nss-lookup.target time-sync.target paths.target Wants=iotwatch@NFS1.service iotwatch@NFS2.service iotwatch@LOC1.service [Install] WantedBy=default.target and the instance services look like: # automatically generated by /usr/lib/iotwatch/iotwatch-generator [Unit] Description=iotwatch I/O performance monitor instance "LOC1" Documentation=man:iotwatch(1) man:iotwatch@.service(8) SourcePath=/etc/iotwatch.conf PartOf=iotwatch.target Requires=iotwatch-generator.service Wants=nss-user-lookup.target time-sync.target paths.target After=iotwatch-generator.service After=nss-user-lookup.target time-sync.target paths.target ConditionPathExists=/etc/passwd Conflicts=shutdown.target [Service] Type=forking RuntimeDirectory=iotwatch-LOC1 WorkingDirectory=/var/run/iotwatch-LOC1 ExecStartPre=/bin/sh -c '...' ExecStart=@/var/run/iotwatch-LOC1/iotwatch-LOC1 iotwatch-LOC1 -l ... /etc/passwd ExecStartPost=/usr/bin/sleep 0.2 TimeoutStartSec=10 ExecStop=/var/run/iotwatch-LOC1/iotwatch-LOC1 -l ... #SyslogIdentifier=%p-LOC1 TimeoutStopSec=30 PIDFile=/var/run/iotwatch-LOC1/iotwatch-LOC1.pid Restart=always RestartSec=10s RestartPreventExitStatus=1 StartLimitBurst=1 [Install] WantedBy=iotwatch.target > > It might also be good to know the RequiredBy, WantedBy, TriggeredBy, > RequisiteOf and PartOf properties of this iotwatch-generator.service (see > `systemctl show iotwatch-generator.service`), since they're possible ways > in which the service may be implicitly started or restarted. Yes, but I'm missing a log message that explains what happened. Regards, Ulrich Windl _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel