Page 1 of 1

Often get empty "New Event", zero length

Posted: Sun Mar 04, 2018 5:35 pm
by joseph85750
I just set up Zoneminder 1.30.4 and everything seems to be working pretty good.
But I'll frequently get events: "New Event", which never get assigned an index/value, and has zero length. They seem to occur right before a legitimate event occurs, but often the legitimate event will never show up. I've attached a screenshot of the Events page as well as the log entries right at the time of this issue, which I think are related.

zm-empty-event.png
zm-empty-event.png (49.71 KiB) Viewed 10744 times

Anyone know what might be causing this?

Thanks!

Re: Often get empty "New Event", zero length

Posted: Sun Mar 04, 2018 5:40 pm
by rockedge
your /var/cache/zoneminder directory with the /events, /images and /temp folders has the correct ownership, permissions and exist?

Re: Often get empty "New Event", zero length

Posted: Sun Mar 04, 2018 5:53 pm
by joseph85750
Yes, and the files are written there with no issue most of the time. I just get the above issue at random times.

Re: Often get empty "New Event", zero length

Posted: Sun Mar 04, 2018 7:03 pm
by rockedge
I have seen this error on occasion as well, at random times and mostly with Debian 9 installations, but in some Ubuntu variations also. I can not pinpoint the exact fix or if there even is one at the moment. I will see if I can create the error again!

Re: Often get empty "New Event", zero length

Posted: Sun Mar 04, 2018 7:40 pm
by iconnor
I am aware of several issues with saving events. I think you will find errors in your logs that will pinpoint the problem.

Re: Often get empty "New Event", zero length

Posted: Sun Mar 04, 2018 7:41 pm
by iconnor
Ah that was dumb of me, you showed the logs that show the problem.

Could be a bad symlink from /usr/share/zoneminder/www/events to /var/cache/zoneminder/events, or permissions.

Re: Often get empty "New Event", zero length

Posted: Sun Mar 04, 2018 9:50 pm
by joseph85750
iconnor wrote: Sun Mar 04, 2018 7:41 pm Ah that was dumb of me, you showed the logs that show the problem.

Could be a bad symlink from /usr/share/zoneminder/www/events to /var/cache/zoneminder/events, or permissions.
If it was a directory permission issue, wouldn't it always fail? The fact that it usually works fine, but then-- usually when there are no existing events already listed-- it will occur. Then, the next events will create images normally.
Not sure how it could be a permission issue based on this observation.

Re: Often get empty "New Event", zero length

Posted: Sun Mar 04, 2018 9:54 pm
by joseph85750
rockedge wrote: Sun Mar 04, 2018 7:03 pm I have seen this error on occasion as well, at random times and mostly with Debian 9 installations, but in some Ubuntu variations also. I can not pinpoint the exact fix or if there even is one at the moment. I will see if I can create the error again!
Interesting observation. Prior to this occurring, I was running on CentOS and never had this happen. I first saw it when I was trying to run Zoneminder on a Raspberry Pi (Debian). I just thought it was due to the fact that the RP didn't have enough horsepower, and would have this issue as well as a few others. But now I'm running on a laptop with more power, and this: Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-116-generic x86_64). Perhaps it is something with Debian based distros..

Re: Often get empty "New Event", zero length

Posted: Mon Mar 05, 2018 1:23 am
by rockedge
with the Ubuntu based distros the error was a directory ownership / permissions issue. The Debian 9 installs run and stream but have these nagging small problems that do not show up in other OS-ZM combinations.

Re: Often get empty "New Event", zero length

Posted: Mon Mar 05, 2018 1:31 am
by montagdude
I get them sometimes here on Slackware 14.2, but only when ZoneMinder is being shut down just as an event is starting, which I think is expected. That doesn't sound like the issue you are experiencing.

Re: Often get empty "New Event", zero length

Posted: Mon Mar 05, 2018 4:27 pm
by joseph85750
To test permissions, yesterday I did:

# cd /var/cache
# chmod -R 777 zoneminder

This morning, I saw the error again, immediately followed by a successful Event.

Zm-event-error.png
Zm-event-error.png (63.18 KiB) Viewed 10705 times

Is it possible that if the full directory doesn't exist when an event occurs, this error results? For example, the following is a directory where images for 2018.03.05 06:35:16 would get stored after the directory is created:

/var/cache/zoneminder/events/Back/18/03/05/06/35/16

Is there a different process which creates the directory? It seems the error doesn't occur if the full directory already exists.

Re: Often get empty "New Event", zero length

Posted: Tue Mar 06, 2018 12:45 am
by bbunge
Fix Permissions

chown -R www-data:www-data /usr/share/zoneminder/

Re: Often get empty "New Event", zero length

Posted: Tue Mar 06, 2018 1:08 am
by rockedge
it does appear that the /events directory is not writable at that moment....partition not mounted or some symlink problem between the monitor events as a name or as id #. I seem to recall not to long ago a thread dealing with something of that sort...... I am just throwing out some ideas.....

Re: Often get empty "New Event", zero length

Posted: Tue Mar 06, 2018 10:01 pm
by joseph85750
bbunge wrote: Tue Mar 06, 2018 12:45 am Fix Permissions

chown -R www-data:www-data /usr/share/zoneminder/
Already determined it's not permissions, at least not on the directories mentioned, as mentioned earlier in the thread.
Also, please note, the Events get created just fine most of the time. It's just the very first image/event at a particular time seems to have the issue.

Re: Often get empty "New Event", zero length

Posted: Thu Mar 08, 2018 3:49 pm
by knight-of-ni
We need to get a better understanding of your complete setup.

Can you provide the following data?
- total number of active cameras in your system
- resolution and framerate of each camera
- what cpu is in the machine and what is the average system load?
- How big is your ramdisk /dev/shm and how full is it?
- verify max fps fields & analysis fields under each monitor config are blank for now.
- Please show an entire page of unedited, unfiltered log entries showing all events prior to and just after the error shows up.
- Describe the disk you are writing events to and its filesystem. Is this the local disk, an external drive, or network fileshare?

In another thread you mentioned you are using an older Dell laptop. Recommend you scan the entire disk for bad sectors. A failing disk can cause the symptoms you have described.