Missing the first event every morning

Support and queries relating to all previous versions of ZoneMinder
Locked
dyuen
Posts: 16
Joined: Mon Jul 10, 2006 5:58 pm

Missing the first event every morning

Post by dyuen »

Hi
I have configure two cameras with Zonminder in two different rooms and ZM did not record the first event in the morning. Normally, the first event in the morning is someone goes into the room, but I only see people go out the room every morning. Also, the original software that bundle with one of the cameras does record the first event.

I have turned off powersave daemon, check on 'can sleep' and 'can wake' (I don't know if they are working or not), and let ZM turn on 24/7, but the problem still occurs. Does anyone encountered thi before? Does anyone know what's the problem?

Thanks in advance. :D
dyuen
Posts: 16
Joined: Mon Jul 10, 2006 5:58 pm

Post by dyuen »

I looked through zmdc.log I found thsomething happen in the morning:
07/25/06 07:49:34.042596 zmdc[14061].INF [Starting pending process, zmc -m 4]
07/25/06 07:49:34.046581 zmdc[16374].INF ['zmc -m 4' started at 06/07/25 07:49:34]
07/25/06 07:49:34.052997 zmdc[14061].INF ['zmc -m 4' starting at 06/07/25 07:49:34, pid = 16374]
Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: premature end of data segment
Corrupt JPEG data: premature end of data segment
07/25/06 07:52:31.949629 zmdc[14061].ERR ['zma -m 2' exited abnormally, exit status 214]
07/25/06 07:52:31.950397 zmdc[14061].INF [Starting pending process, zma -m 2]
07/25/06 07:52:31.953694 zmdc[16376].INF ['zma -m 2' started at 06/07/25 07:52:31]
07/25/06 07:52:31.972096 zmdc[14061].INF ['zma -m 2' starting at 06/07/25 07:52:31, pid = 16376]
07/25/06 07:52:43.124869 zmdc[14061].ERR ['zmc -m 4' exited abnormally, exit status 255]
What does exit status 214 mean?
dyuen
Posts: 16
Joined: Mon Jul 10, 2006 5:58 pm

Post by dyuen »

I have found this on /var/log/messages
Jul 25 07:52:31 zoneminder zma_m2[14096]: ERR [Can't insert event: MySQL server has gone away]
Jul 25 07:52:31 zoneminder zmdc[14061]: ERR ['zma -m 2' exited abnormally, exit status 214]
So, MySQL maybe the reason behind this. I am looking into how to fix MySQL connection now.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

looking at your second log then yes it looks like mysql might be crashing. What i cant understand though is that it then recovers! (recording people leaving room) the only thing i can suggest is that when the motion is detected that your machine gets swamped. What hardware is it on how many inputs, framerate mode and resolution etc
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
dyuen
Posts: 16
Joined: Mon Jul 10, 2006 5:58 pm

Post by dyuen »

Thanks for reply, James.

I don't think mysql have crashed.
I have run mysqladmin version and it gives the following output:
mysqladmin Ver 8.41 Distrib 5.0.18, for suse-linux on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version 5.0.18
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 6 days 50 min 9 sec

Threads: 8 Questions: 99025 Slow queries: 0 Opens: 0 Flush tables: 1 Open tables: 21 Queries per second avg: 0.190
the server has been up for six days, but the error occurs almost everyday. Do you know how can I view sqlserver log?

Daniel
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

depends on your distri but its usually in /var/logs/
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
CATO
Posts: 1
Joined: Sat Jul 15, 2006 4:38 am
Location: Butler, AL

Missing events

Post by CATO »

I've noticed the same type of problem. I've experienced it in vs 1.21.3 and in vs 1.22.2.2. Currently researching...
I see, I see, said the blind man.
dyuen
Posts: 16
Joined: Mon Jul 10, 2006 5:58 pm

Post by dyuen »

James,
thanks, I have found a soft link to the log in /var/log , but didnt found anything interesting.

Also, I have found that lowering warm-up frame helps to get around this problem. I think i can set warm-up frame beween 10 - 1.

In documentation:
Warm-up Frames – This specifies how many frames the analysis daemon should process but not examine when it starts. This allows it to generate an accurate reference image from a series of images before looking too carefully for any changes. I use a value of 25 here, too high and it will take a long time to start, too low and you will get false alarms when the analysis daemon starts up.
I guess I may want to generate false alarm whenever the analysis daemon starts up.

Thanks
Daniel
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

that shouldnt have anything to do with it as that is how many frames are ignored on deamon start and your demon should be running already
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
dyuen
Posts: 16
Joined: Mon Jul 10, 2006 5:58 pm

Post by dyuen »

James,

If you refer to the second thread of this post, you will see the following
07/25/06 07:52:31.949629 zmdc[14061].ERR ['zma -m 2' exited abnormally, exit status 214]
now I shorten the warm-up frame will not fix the problem at all :oops:, but it will help to get around this problem on a higher level :)
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

i see!
so it detects otion crashes
restarts then is ignored due to startup

Yeah thats not a fix is it really!

We need to find out why its crashing. And i can only assume its a machine power thing but im sure we discounted that
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
freebsd-guy
Posts: 10
Joined: Sun Jan 14, 2007 11:06 pm

Post by freebsd-guy »

I can see this is a really old thread, but google search only showed this one, so I'm reviving it.

I've had the same issue for a while and was able to eliminate it.

At the top-level mysql database directory (or possibly in zm-specific database area), add the following to my.cnf (create the file if it doesn't exist):

Code: Select all

[mysqld]
wait_timeout=604800
On my build, the default was 28800 (seconds == 8 hours). If there isn't an activity in 8 hours, mysql closed the connection. 604800 is 7 days. I figured something ought to happen at least once every week.

Note that I don't believe this is really the correct way to fix the problem. zma should either not leave the connection open, or first try to reconnect if the connection disappears.

But it's still one way to solve the problem.

--rich
Locked