error opening events folder

Forum for questions and support relating to the 1.30.x releases only.
jalworth
Posts: 6
Joined: Mon Sep 12, 2016 6:14 pm

error opening events folder

Post by jalworth »

My log is filled with zmu and zms err messages saying:
"Can't open events/monitor-3/diag-0-poly.jpg: no such file..."
But ZM is writing to it and saving events. I see live video and can see stored events.
I followed the instructions for moving the events and images folders to an external hard drive.
I have the owner/group set to www-data.
This error only happens when I have zmNinja (either android or windows version) running in live mode.

I get one error when I open a monitor in ZM and leave it open. When I open a monitor from zmNinja I get one error every 5sec for as long as it is open.
dws
Posts: 43
Joined: Mon Jan 15, 2018 2:05 pm

Re: error opening events folder

Post by dws »

I'm currently having the same issue under Ubuntu 16.04.3.
Were you able to find a solution?
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: error opening events folder

Post by bbunge »

jalworth wrote: Tue Sep 13, 2016 4:52 pm My log is filled with zmu and zms err messages saying:
"Can't open events/monitor-3/diag-0-poly.jpg: no such file..."
But ZM is writing to it and saving events. I see live video and can see stored events.
I followed the instructions for moving the events and images folders to an external hard drive.
I have the owner/group set to www-data.
This error only happens when I have zmNinja (either android or windows version) running in live mode.

I get one error when I open a monitor in ZM and leave it open. When I open a monitor from zmNinja I get one error every 5sec for as long as it is open.
You did not say which instructions you used to move your events/images. Your external hard drive needs to have a file system that understands symbolic links. A Linux file system.
Since you are running Ubuntu here is a link to a way to use systemd to mount an external drive: https://wiki.zoneminder.com/Common_Issu ... ive_or_NAS

For your errors while watching a monitor change PATH_SWAP to /dev/shm
dws
Posts: 43
Joined: Mon Jan 15, 2018 2:05 pm

Re: error opening events folder

Post by dws »

bbunge wrote: Mon Jan 15, 2018 3:25 pm
jalworth wrote: Tue Sep 13, 2016 4:52 pm My log is filled with zmu and zms err messages saying:
"Can't open events/monitor-3/diag-0-poly.jpg: no such file..."
But ZM is writing to it and saving events. I see live video and can see stored events.
I followed the instructions for moving the events and images folders to an external hard drive.
I have the owner/group set to www-data.
This error only happens when I have zmNinja (either android or windows version) running in live mode.

I get one error when I open a monitor in ZM and leave it open. When I open a monitor from zmNinja I get one error every 5sec for as long as it is open.
You did not say which instructions you used to move your events/images. Your external hard drive needs to have a file system that understands symbolic links. A Linux file system.
Since you are running Ubuntu here is a link to a way to use systemd to mount an external drive: https://wiki.zoneminder.com/Common_Issu ... ive_or_NAS

For your errors while watching a monitor change PATH_SWAP to /dev/shm
Um.. I didn't say I was on an external drive, and I don't see where the OP said they were, either...
These errors are showing up in the logs whenever a camera is viewed.
Thanks in advance.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: error opening events folder

Post by knight-of-ni »

dws wrote: Mon Jan 15, 2018 6:12 pm Um.. I didn't say I was on an external drive, and I don't see where the OP said they were, either...
These errors are showing up in the logs whenever a camera is viewed.
Thanks in advance.
OP said in his/her opening statement an external drive was being used...
jalworth wrote: Tue Sep 13, 2016 4:52 pm I followed the instructions for moving the events and images folders to an external hard drive.
External drives often ship pre-formatted with a Windows NTFS filesystem, which is not compatible. The drive must be reformatted to a Linux filesystem, such as ext4, before it can be used with zoneminder. OP needs to verify this was done. That is what bbunge was getting at.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
dws
Posts: 43
Joined: Mon Jan 15, 2018 2:05 pm

Re: error opening events folder

Post by dws »

Furthermore, changing PATH_SWAP did nothing to fix the issue.
Any other suggestions, please?
dws
Posts: 43
Joined: Mon Jan 15, 2018 2:05 pm

Re: error opening events folder

Post by dws »

2018-01-15 14:34:51.458195 zms 22438 ERR Can't open events/Disassembly/diag-0-poly.jpg: No such file or directory zm_image.cpp 869
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: error opening events folder

Post by bbunge »

Well it is possible you did not give the events folder the right permissions at install.

Instructions for you to review: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
(I run these instructions almost every week to make sure they still work)

Fix Permissions

chown -R www-data:www-data /usr/share/zoneminder/
dws
Posts: 43
Joined: Mon Jan 15, 2018 2:05 pm

Re: error opening events folder

Post by dws »

I installed using those instructions, followed them to the letter.
Permissions were also set in /usr/share/zoneminder per both the instructions and your suggestion above.
No effect; the error still appears when a monitor's stream is viewed.
/var/cache/zoneminder (subdirectories of which contain the diag-?-poly.jpg files) is 755 and owned by www-data:www-data all the way down the directory chain to the very last file.

I really don't believe this is an ownership/permissions issue. There's something else going on.
dws
Posts: 43
Joined: Mon Jan 15, 2018 2:05 pm

Re: error opening events folder

Post by dws »

Interestingly, the events folder that it's attempting to go through is a symlink... as per this:
drwxr-xr-x 8 www-data www-data 4096 Jan 11 14:54 .
drwxr-xr-x 5 www-data www-data 4096 Dec 22 17:27 ..
drwxr-xr-x 4 www-data www-data 4096 Jan 1 14:12 1
drwxr-xr-x 4 www-data www-data 4096 Jan 1 00:30 2
drwxr-xr-x 4 www-data www-data 4096 Jan 1 00:00 3
drwxr-xr-x 4 www-data www-data 4096 Jan 1 01:54 4
drwxr-xr-x 4 www-data www-data 4096 Jan 2 10:24 5
drwxr-xr-x 4 www-data www-data 4096 Jan 3 10:09 6
lrwxrwxrwx 1 www-data www-data 1 Dec 15 15:40 Disassembly -> 1
lrwxrwxrwx 1 www-data www-data 1 Dec 15 16:16 DWS1-webcam -> 5
lrwxrwxrwx 1 www-data www-data 1 Dec 29 16:07 DWS2-webcam -> 6
lrwxrwxrwx 1 www-data www-data 1 Dec 15 15:59 ECHEM-E -> 3
lrwxrwxrwx 1 www-data www-data 1 Dec 15 16:02 ECHEM-W -> 4
lrwxrwxrwx 1 www-data www-data 1 Dec 15 15:55 Office -> 2
Permissions and ownership look good, but I'm wondering if some systems have difficulty navigating through symbolic links as opposed to going directly to the monitor number... or if there's a workaround.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: error opening events folder

Post by bbunge »

Well, lets focus on your external drive. Does it have an EXT4 format?
Are you sure it mounts before Zoneminder starts (systemd mount will make sure this happens)?

Errors when a stream is viewed can be caused by the browser. Use Firefox and apply the montage fix if needed:

Enter about:config in the address bar

scroll down to
browser.cache.check_doc_frequency 3
change the 3 to a 1

browser.cache.disk.enable True -> False
network.http.max-connections-per-server -> put a value of 100
network.http.max-persistent-connections-per-proxy -> 100 again
network.http.max-persistent-connections-per-server -> 100 again
dws
Posts: 43
Joined: Mon Jan 15, 2018 2:05 pm

Re: error opening events folder

Post by dws »

Again... Let me make this clear...

I.
DO.
NOT.
HAVE.
AN.
EXTERNAL.
DRIVE.

These errors are occurring on the internal drive(s) in the machine.

All the drives are formatted EXT4.

The errors in question seems to be Zoneminder not being able to find a file that actually does exist, and it is attempting to find that file through a symlink.
dws
Posts: 43
Joined: Mon Jan 15, 2018 2:05 pm

Re: error opening events folder

Post by dws »

Also: using Chromium-browser on Ubuntu, and those cache/connection settings don't apply to my setup.
dws
Posts: 43
Joined: Mon Jan 15, 2018 2:05 pm

Re: error opening events folder

Post by dws »

Also, clicking on the "zone ID" number instead of the zone name gives the same error. It's almost as if ZoneMinder is hardcoded to use the symlink instead of going direct to the numbered zone. This *might* be the cause of the errors.

This is on v1.30.4, by the way. As the OP posted this question in 2016, I assume this error/issue has been around in previous versions, and for quite some time.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: error opening events folder

Post by rockedge »

while experimenting running ZM with other operating systems I have run across this error occasionally. I think it was a path and permissions problem. Somehow this was related to an event Export function failure where ZM could not write to the /var/cache/zoneminder/temp folder. Corrupting the path creations for the symlink. I will have to replicate it to remember what I did to fix it.
Locked