My zoneminder 1.29.0 takes a stop now and then.
It happens randomly and havent been able to find any real triggers for these stops.
My log says:
Mar 17 08:17:34 server1 systemd[1]: zoneminder.service: Main process exited, code=exited, status=255/n/a
Mar 17 08:17:36 server1 zmpkg[21839]: INF [Sanity checking States table...]
Mar 17 08:17:39 server1 zmpkg[21839]: INF [Command: stop]
Mar 17 08:17:44 server1 systemd[1]: zoneminder.service: Control process exited, code=exited status=1
There is no reason earlier in the log for the INF: command: stop ...
Help please to explain this.
Zoneminder stops randomly
-
- Posts: 114
- Joined: Tue Jul 27, 2010 6:36 am
Re: Zoneminder stops randomly
check out logging options and set so more detailed logging occurs. then investigate what that tells you .
Re: Zoneminder stops randomly
Most of the time I have found that zm quitting due to mysql restarting or running out of connections.
-
- Posts: 114
- Joined: Tue Jul 27, 2010 6:36 am
Re: Zoneminder stops randomly
My opinion here but when a system makes a monumental decision such as to shut itself down, enough information should be logged to allow the reason to be ascertained. That has been my experience working on mission critical systems.
If to many (or lost) mysql connections are the cause, wouldn't that be a bug and shouldn't the system self heal? I, of course, do not know the degree of complexity involved for such a capability so maybe its not practical.
If to many (or lost) mysql connections are the cause, wouldn't that be a bug and shouldn't the system self heal? I, of course, do not know the degree of complexity involved for such a capability so maybe its not practical.
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Zoneminder stops randomly
A better analogy would be if Mission Critical Component A was told by Mission Critical Component B to stop. Typically to discover the root cause, one would investigate why Mission Critical Component B told A to stop. We already know why A stopped, because B told it to!
From the log information you posted, the "system" you are referring to is systemd (component B), not zoneminder (component A). ZoneMinder did not detect a problem and then decide to stop itself. systemd detected a problem and told ZoneMinder to stop. This is why there is nothing to fix in ZoneMinder, and there is no further information available to ZoneMinder which it can log.
If you want to figure out the root cause of this, you have to go looking at the other components of your system other than ZoneMinder.
If you want to ignore the root cause, you can remove all the dependencies from the zoneminder service file, particularly mysql, and also add a "restart=always" line. See the systemd documentation. This could make the problem worse rather than better, but on the other hand ZoneMinder will continue to run and likely give you all sorts of errors in the log file (maybe that will provide another clue).
From the log information you posted, the "system" you are referring to is systemd (component B), not zoneminder (component A). ZoneMinder did not detect a problem and then decide to stop itself. systemd detected a problem and told ZoneMinder to stop. This is why there is nothing to fix in ZoneMinder, and there is no further information available to ZoneMinder which it can log.
If you want to figure out the root cause of this, you have to go looking at the other components of your system other than ZoneMinder.
If you want to ignore the root cause, you can remove all the dependencies from the zoneminder service file, particularly mysql, and also add a "restart=always" line. See the systemd documentation. This could make the problem worse rather than better, but on the other hand ZoneMinder will continue to run and likely give you all sorts of errors in the log file (maybe that will provide another clue).
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/