Zoneminder stops randomly

Forum for questions and support relating to the 1.29.x releases only.
Locked
tribb
Posts: 2
Joined: Mon Apr 23, 2012 12:54 pm

Zoneminder stops randomly

Post by tribb »

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.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Zoneminder stops randomly

Post by bbunge »

AnotherBrian
Posts: 112
Joined: Tue Jul 27, 2010 6:36 am

Re: Zoneminder stops randomly

Post by AnotherBrian »

check out logging options and set so more detailed logging occurs. then investigate what that tells you .
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Zoneminder stops randomly

Post by iconnor »

Most of the time I have found that zm quitting due to mysql restarting or running out of connections.
AnotherBrian
Posts: 112
Joined: Tue Jul 27, 2010 6:36 am

Re: Zoneminder stops randomly

Post by AnotherBrian »

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.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Zoneminder stops randomly

Post by knight-of-ni »

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).
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/
Locked