Error: Can't open '/var/lib/zoneminder/events/...'

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
chezclue
Posts: 2
Joined: Mon Mar 23, 2020 1:20 pm

Error: Can't open '/var/lib/zoneminder/events/...'

Post by chezclue »

The issue I'm seeing I can now reliably replicate. The error that occurs appears hundreds or thousands times resembles this in some manner:
----- copied text -----
ERR [zms_e4882] [Can't open /var/lib/zoneminder/events/4/2020-03-17/4882/00105-capture.jpg: No such file or directory]
----- copied text -----

I walked through and read many of the comments in the forum with similar issues. I didn't see one that addressed or resolved the issue, just recurring solutions for external hard drives. There are no external hard drives on the system in question and all are formatted w/ XFS. I'm running CentOS 7 kernel 3.10.0-1062.12.1.el7.x86_64 and I have the following packages installed:
- httpd-2.4.6-90.el7.centos.x86_64
- httpd-tools-2.4.6-90.el7.centos.x86_64
- http-parser-2.7.1-8.el7_7.2.x86_64
- zoneminder-1.34.5-1.el7.x86_64
- zoneminder-httpd-1.34.5-1.el7.x86_64
- zoneminder-common-1.34.5-1.el7.x86_64

I can replicate it as follows:
- from Console view, click on camera to view its event list (Console Window)
- click on an event; this causes a pop up window w/ event to appear (Event Window)
- once I'm done viewing the event in the Event Window, I click into the Console Window to delete the event

The video for the event in the Event Window is not playing back video, it reached the end and has stopped.

The following things -do not cause an error-:
- from Console view, click on camera to view its events list (Console Window)
- click on the first event; this causes a pop up window w/ first event to appear (Event Window)
- once I'm done viewing the first event, I click in the Console Window on a second event; that second event appears in the Event Window
- I can click in the Console Window to delete the first event w/o issue
Also no errors when:
- from Console view, click on camera to view its events list (Console Window)
- click on an eventl this causes a pop up window w/ the event to appear (Event Window)
- once I'm done viewing the event, I close the Event Window
- on the Console Window I delete the event

So, if the first event is active in the Event Window and I delete the first event in the Console Window, horrible things happen. If the Event Window is not actively loading content, then why is it trying to access all of the files associated with that event - that have not been deleted?

Thanks for any advise.
Stu
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Error: Can't open '/var/lib/zoneminder/events/...'

Post by rockedge »

interesting...I am seeing this as well on 2 different systems. Check the permissions for
/var/cache/zoneminder/event/ and then each individual monitor directory which corresponds to the monitor number. In my case the permissions of the newly created directories end up starting out as 440 but should be 755.

I have added a umask 022 statement in the /home/www-data/.bashrc which helped on one system but not at all on the other. That I changed them manually and then the error disappears.

You will notice after an event is created, the thumbnail view of the event will be missing in the events list
chezclue
Posts: 2
Joined: Mon Mar 23, 2020 1:20 pm

Re: Error: Can't open '/var/lib/zoneminder/events/...'

Post by chezclue »

Permissions, ownership, and SELinux context were not the issue.

As I said, I can reproduce this reliably. When I delete the event and the event monitoring window is still open, the process attempting to read the files that are not present cause the event monitoring window to spew errors. I don't understand why, if the video for that event has ceased playing why it's still trying to access all of those files.

This is an event deletion problem that the system is still trying to access, rather than a problem w/ the event when it is created.
chyre
Posts: 1
Joined: Fri Jul 16, 2021 11:12 am

Re: Error: Can't open '/var/lib/zoneminder/events/...'

Post by chyre »

i see the exact same issue. its very annoying because this generates many syslogs with an error severity and ends up spamming my email. i have alerts setup t do this when i get errors in my logs. so i am very aware of every time this happens.

for example..
Jul 16 07:04:11 sol zms_e213[32607]: ERR [zms_e213] [Can't open /var/cache/zoneminder/events/1/2021-06-26/213/00181-capture.jpg: No such file or directory]

its definitely nothing to do with permissions.
drwxr-xr-x 2 www-data www-data 4096 Jul 16 07:04 2021-06-26

please help us understand how to address this issue.
dougmccrary
Posts: 1172
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Error: Can't open '/var/lib/zoneminder/events/...'

Post by dougmccrary »

I suppose I must be misunderstanding, but it seems you are deleting a recording that is still in progress.
The error would appear because you have deleted the directory where the recording is supposed to be going.

BTW, you mention "clicking on the camera" - where, exactly?
Post Reply