Zoneminder stops randomly

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

Zoneminder stops randomly

Post by tribb » Fri Mar 17, 2017 10:28 am

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.

Posts: 2684
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Zoneminder stops randomly

Post by bbunge » Sun Mar 19, 2017 7:12 pm

Posts: 103
Joined: Tue Jul 27, 2010 6:36 am

Re: Zoneminder stops randomly

Post by AnotherBrian » Fri Mar 24, 2017 6:55 pm

check out logging options and set so more detailed logging occurs. then investigate what that tells you .

User avatar
Posts: 1246
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto

Re: Zoneminder stops randomly

Post by iconnor » Mon Apr 17, 2017 2:51 am

Most of the time I have found that zm quitting due to mysql restarting or running out of connections.

Posts: 103
Joined: Tue Jul 27, 2010 6:36 am

Re: Zoneminder stops randomly

Post by AnotherBrian » Thu May 11, 2017 9:48 pm

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
Posts: 2278
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Zoneminder stops randomly

Post by knight-of-ni » Fri May 12, 2017 12:36 am

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

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests