Hello,
/etc/systemd/system/webcamd.service is defined as follow :
[Unit]
Description=the OctoPi webcam daemon with the user specified config
# ConditionPathExists=/etc/octopi_streamer/mjpeg
[Service]
WorkingDirectory=/root/bin
StandardOutput=append:/var/log/webcamd.log
StandardError=append:/var/log/webcamd.log
ExecStart=/root/bin/webcamd
Restart=always
Type=forking
RestartSec=1
[Install]
WantedBy=multi-user.target
but process /root/bin/webcamd does not fork, hence provoking systemd to think that the unit has failed and restarting it over and over again.
syslog:Jul 17 15:30:40 mk3s systemd[1]: webcamd.service: Succeeded.
syslog:Jul 17 15:32:10 mk3s systemd[1]: webcamd.service: start operation timed out. Terminating.
syslog:Jul 17 15:32:10 mk3s systemd[1]: webcamd.service: Failed with result 'timeout'.
syslog:Jul 17 15:32:11 mk3s systemd[1]: webcamd.service: Scheduled restart job, restart counter is at 1.
syslog:Jul 17 15:33:41 mk3s systemd[1]: webcamd.service: start operation timed out. Terminating.
syslog:Jul 17 15:33:41 mk3s systemd[1]: webcamd.service: Failed with result 'timeout'.
syslog:Jul 17 15:33:43 mk3s systemd[1]: webcamd.service: Scheduled restart job, restart counter is at 2.
syslog:Jul 17 15:35:13 mk3s systemd[1]: webcamd.service: start operation timed out. Terminating.
syslog:Jul 17 15:35:13 mk3s systemd[1]: webcamd.service: Failed with result 'timeout'.
syslog:Jul 17 15:35:14 mk3s systemd[1]: webcamd.service: Scheduled restart job, restart counter is at 3.
syslog:Jul 17 15:36:44 mk3s systemd[1]: webcamd.service: start operation timed out. Terminating.
syslog:Jul 17 15:36:44 mk3s systemd[1]: webcamd.service: Failed with result 'timeout'.
syslog:Jul 17 15:36:46 mk3s systemd[1]: webcamd.service: Scheduled restart job, restart counter is at 4.
syslog:Jul 17 15:38:16 mk3s systemd[1]: webcamd.service: start operation timed out. Terminating.
syslog:Jul 17 15:38:16 mk3s systemd[1]: webcamd.service: Failed with result 'timeout'.
syslog:Jul 17 15:38:17 mk3s systemd[1]: webcamd.service: Scheduled restart job, restart counter is at 5.
syslog:Jul 17 15:39:47 mk3s systemd[1]: webcamd.service: start operation timed out. Terminating.
syslog:Jul 17 15:39:47 mk3s systemd[1]: webcamd.service: Failed with result 'timeout'.
syslog:Jul 17 15:39:49 mk3s systemd[1]: webcamd.service: Scheduled restart job, restart counter is at 6.
syslog:Jul 17 15:41:19 mk3s systemd[1]: webcamd.service: start operation timed out. Terminating.
syslog:Jul 17 15:41:19 mk3s systemd[1]: webcamd.service: Failed with result 'timeout'.
syslog:Jul 17 15:41:20 mk3s systemd[1]: webcamd.service: Scheduled restart job, restart counter is at 7.
Removing Type=forking from the unit definition will avoid that behavior.
Hello,
/etc/systemd/system/webcamd.service is defined as follow :
but process
/root/bin/webcamddoes not fork, hence provoking systemd to think that the unit has failed and restarting it over and over again.Removing
Type=forkingfrom the unit definition will avoid that behavior.