Cannot view events!

Forum for questions and support relating to 1.35.x development only.
Post Reply
allanmacdonald
Posts: 6
Joined: Sun Mar 28, 2010 1:51 am

Cannot view events!

Post by allanmacdonald » Fri May 22, 2020 2:08 am

I cannot view any events. When I try to do so, I see only the snapshot image, not the numbered frames. The Progress indicator shows: "Progress: NaN:NaN:NaNs" and the Replay rate is always "Stop".

In the logs, I see a huge number of entries like the following:
Can't open /var/cache/zoneminder/events/4/2020-05-21/148/-8416-capture.jpg: No such file
or directory

The file name in the database entry appears to be incorrect - a typical name would be "00861-capture.jpg". Why is the database entry incorrect?

I have one camera set to record at 2 frames per second so I end up with around 1200 images per event directory. I can go into the event directory and view each jpg file and I can use Zoneminder to view each frame but I can't get the events to play in the event player.

I tried purging all the files, deleting every record in the events database and restarting the service and I am back with this behaviour. I am dead in the water at this point.

I am running V1.35.4 on a Ubuntu 16.04LTS server. I am running this version because the previous ppa wouldn't update due to an invalid release file:
The repository 'http://ppa.launchpad.net/iconnor/zoneminder/ubuntu xenial
Release' does not have a Release file.
When I edited my sources.list.d file to add deb http://ppa.launchpad.net/iconnor/zonemi ... ter/ubuntu xenial main, I ended up with 1.35.4. If this version of zoneminder is too new, I have no idea how to downgrade to an earlier version.

rockedge
Posts: 1154
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: Cannot view events!

Post by rockedge » Fri May 22, 2020 6:13 pm

Hello!
have you checked the system clock and looked at the setting for TimeZone in Options->Systems in Zoneminder?

also a restart of the mysql server may be needed to sync the time between the servers. I may be way off but it's a start

The time being correct is important for the way the events are named along with the images associated with that alarm event

allanmacdonald
Posts: 6
Joined: Sun Mar 28, 2010 1:51 am

Re: Cannot view events!

Post by allanmacdonald » Sat May 23, 2020 3:49 pm

@rockedge:

Thanks for the tip. I did indeed find out the timezone setting was
Unset - use value in php.ini
.

However, I have a question about this:
Unset - use value in php.ini
means to me that,
As long as I am satisfied with the default system settings, I don't have to change this field in the zoneminder system settings.
Can you explain to me why this is an issue? Since mysql and zoneminder are running on the same machine, here are all the applicable settings on the server:

Code: Select all

$ timedatectl
      Local time: Sat 2020-05-23 11:10:53 ADT
  Universal time: Sat 2020-05-23 14:10:53 UTC
        RTC time: Sat 2020-05-23 14:10:53
       Time zone: America/Halifax (ADT, -0300)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

$ grep 'date.timezone =' /etc/php/7.0/apache2/php.ini
date.timezone = America/Halifax
In mysql:

Code: Select all

mysql> SELECT @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| SYSTEM             | SYSTEM              |
+--------------------+---------------------+
1 row in set (0.00 sec)
tz.php:

Code: Select all

<?php

print date_default_timezone_get();
Browser output:
America/Halifax

allanmacdonald
Posts: 6
Joined: Sun Mar 28, 2010 1:51 am

Re: Cannot view events!

Post by allanmacdonald » Wed May 27, 2020 3:07 am

I "downgraded" to (i.e. uninstalled, purged, and installed) V1.34.15 and Zoneminder still refuses to play recorded events. The "No such file or directory" errors seem to have disappeared but but the event viewer continues to misbehave.

I can find the recorded frames in /var/cache/zoneminder/events/1/2020-05-26/3 so the recording is working - just the re-assembling of the images into a stream in the zoneminder event viewer page seems to be failing.

The bottom of the event viewer page, under the event frame, is the following line of text:
Mode: Replay Rate: Progress: NaN:NaN:NaNs Zoom: 0x

Some guidance would be greatly appreciated. Is there anything I can do to gather more information that can help troubleshoot this (i.e. log entries, settings, etc)?

bertrams
Posts: 4
Joined: Sun May 17, 2020 9:02 pm

Re: Cannot view events!

Post by bertrams » Wed May 27, 2020 1:51 pm

Since 1.35.4, I can only get events to play back if I use a lower resolution for the monitors. Many cameras have a second stream with a lower resolution than the primary, and some allow a choice of stream resolution. Before I upgraded I could play back the high res events just fine so I'm not sure what changed.

If I try to plat back a high res event (say above 720), the event window opens but the playback freezes on the first frame and the log shows "Got signal 6 (Aborted), crashing" followed by backtrace details. This same thing has happens on two separate installations, both Ubuntu 18.04 using
deb http://ppa.launchpad.net/iconnor/zonemi ... ter/ubuntu bionic main

You might try a lower resolution to see if that helps your playback issue

myurkoski
Posts: 16
Joined: Fri Aug 05, 2016 6:27 pm

Re: Cannot view events!

Post by myurkoski » Fri Aug 07, 2020 2:52 pm

I too have been fighting an issue as Allan describes on v1.35.5. Since sometime in May, replaying events is broken, and a large number of log entries appear stating that the files do not exist.

Like Allan, I too see new entries appearing in that location, and have confirmed permissions are all appropriately set so I don't believe its a lack of actual write access. It just seems to look for file names that do not exist in that location. Usually the files that it fails to find in the error logs are a much larger number than those that reside in that location. A quick review last night it was seeking files in the 00800's and above, but the highest file # in that location was 00286.

I've repaired the database, checked time zones, checked settings in zoneminders web interface, and yet it seems that the application still struggles to find the files. One interesting clue is that using ZMNinja on android, events play back fine (though I haven't checked for log entries yet). Is there same misconfiguration in the web interface that could cause this?

I just cleared the logs this morning, and live way out in the country so it'll take a few hrs to build a library of events. Once I have some I'll make a reply that illustrates what I'm seeing.


Thanks!
myurkoski

User avatar
iconnor
Posts: 1325
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Cannot view events!

Post by iconnor » Fri Aug 07, 2020 3:48 pm

The useful info here is this:

Can't open /var/cache/zoneminder/events/4/2020-05-21/148/-8416-capture.jpg: No such file or directory

Unless you have modified the code and compiled it yourself, the format used to create this path is

snprintf(staticConfig.capture_file_format, sizeof(staticConfig.capture_file_format), "%%s/%%0%dd-capture.jpg", config.event_image_digits);

Which means that the frame # must be so big that we are getting an integer wrap-around. Which seems unlikely given that frame id's start at 1. We should probably be using a %u here instead of %d.

What do you have for Options -> Config -> Event_image_digits? Default is 5.

myurkoski
Posts: 16
Joined: Fri Aug 05, 2016 6:27 pm

Re: Cannot view events!

Post by myurkoski » Fri Aug 07, 2020 4:10 pm

Mine is still at the default of "5" for Event digits.

Here is a subset of my errors:
2020-08-07 09:04:28 zms_e70 13350 ERR Can't open /pagemaster/zm_storage/events/1/2020-08-07/70/02368-capture.jpg: No such file or directory zm_eventstream.cpp 702
2020-08-07 09:04:28 zms_e70 13350 ERR Can't open /pagemaster/zm_storage/events/1/2020-08-07/70/02369-capture.jpg: No such file or directory zm_eventstream.cpp 702
2020-08-07 09:04:28 zms_e70 13350 ERR Can't open /pagemaster/zm_storage/events/1/2020-08-07/70/02370-capture.jpg: No such file or directory zm_eventstream.cpp 702
2020-08-07 09:04:28 zms_e70 13350 ERR Can't open /pagemaster/zm_storage/events/1/2020-08-07/70/02371-capture.jpg: No such file or directory zm_eventstream.cpp 702
2020-08-07 09:04:28 zms_e70 13350 ERR Can't open /pagemaster/zm_storage/events/1/2020-08-07/70/02372-capture.jpg: No such file or directory zm_eventstream.cpp 702
2020-08-07 09:04:28 zms_e70 13350 ERR Can't open /pagemaster/zm_storage/events/1/2020-08-07/70/02373-capture.jpg: No such file or directory

But here is the directory itself, with a max file # of 292:
directory contents.png
directory contents.png (27.67 KiB) Viewed 334 times
From your comment, iconnor, it would appear that Allan and I may have different causes leading to similar behavior.

myurkoski
Posts: 16
Joined: Fri Aug 05, 2016 6:27 pm

Re: Cannot view events!

Post by myurkoski » Fri Aug 07, 2020 5:09 pm

Interestingly, it looks like it starts to play the files there, but wildly overruns the # of files that are actually present.

Here is an example where I just forced an alarm manually, and looked at the errors that were generated when I went to play it back in the browser.

Here is the complete directory contents list:
directory contents 2.png
directory contents 2.png (27.57 KiB) Viewed 330 times
And here is where the errors begin in the log:
Errors event 79.png
Errors event 79.png (138.68 KiB) Viewed 330 times
There are thousands of errors in the log after that point, all of which generate in just a few seconds. Is there some setting that went wonky, making it mismatched between the rate or duration it thinks its recording at versus what it actually is?

I did just confirm that playing the events back through ZMninja generates no errors, its just through the web interface that event playback problems occur. This seems like a major clue potentially

myurkoski
Posts: 16
Joined: Fri Aug 05, 2016 6:27 pm

Re: Cannot view events!

Post by myurkoski » Fri Aug 07, 2020 5:28 pm

Also, it seems that it generates a much higher # of errors when in "High Bandwidth" mode. They don't go away entirely in "Medium Bandwidth" mode, but they are significantly reduced (a few dozen during event playback instead of hundreds). The events also seem to play, instead of playing the first frame and freezing permanently. Entire system is connected with stable wired gigabit Ethernet, no dropped packets or other issues.

Thanks,
myurkoski

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests