Closed foosel closed 3 years ago
Small addendum and correction, no working camera attached. The script will find some hardcoded video devices that apparently are memory mapped devices for encoding purposes and not compatible to mjpg streamer.
Never mind, that's the RPi camera devices.
What were you doing?
/var/log/syslog
and noticed the camera daemon kept restarting every other secondWhat did you expect to happen?
The daemon not to restart right away, but to keep running but sleep for 120s between each scan loop.
What happened instead?
The daemon script exited. The systemd file then made it immediately restart again. Endless loop.
Did the same happen when running OctoPrint in safe mode?
Not tied to OctoPrint.
Version of OctoPi
1.0.0, current
devel
branch pulled this morning. Also confirmed on 0.18.0.Printer model & used firmware incl. version
Not tied to a printer (also no printer connected)
Screenshot(s)/video(s) showing the problem:
Additional notes
This seems to be caused by a combination of these lines in the
webcamd
script:and the
Restart: always
behaviour of the system unit file.webcamd
was originally intended to never exit (which is also while there's awhile true
in there) and only sleep 2min whenever inactive before running another rescan. Some changes introduced with 555b28b06fccf10b4423c9ee9a807aa2c7916475 / #596 / #597 have changed this, and now things end in a restart storm if no webcam is connected as a consequence.I suggest we remove the
while True
and instead leave it up to the restart policy in the system unit to take care of the 2min rescans. At least that's the only thing I can see working right now, since the multi cam support and array matching there changed the script so much from the original that I have no idea what I would break in touching THAT.