log error

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
ghostwolf59
Posts: 19
Joined: Sat Apr 11, 2020 12:46 pm

log error

Post by ghostwolf59 »

Anyone that know what the problem is when the log keep sending repeated statements like this...?

2020-05-31 15:41:51 zms_e1 103016 ERR Can't open /var/db/zoneminder/events/4/2020-05-31/1/00038-capture.jpg: No such file or directory zm_eventstream.cpp 679

When checking the system I noticed that there's no folder named "1" for event "4"
i.e this path does not exists on the server...
/var/db/zoneminder/events/4/2020-05-31/1

This is the path where all jpg's is stored...
/var/db/zoneminder/events/4/2020-05-31/4/ (see screen shot)
zm jpg path.jpg
zm jpg path.jpg (110.92 KiB) Viewed 6542 times
I also notices the error showing up where it points to a jpg that never ever existed
points to a jpg file named 00000-capture.jpg: No such file or directory
No events creates a jpg named 00000-capture.jpg, so why is the app spitting the dummy on a file that never is generated ????

Also wonder why the log dont reset when pressing Rest or Clear???
Only way I seem to be able to reset the log and errors spat *that keep repeating itself over and over again *identical error repeated over and over again*, is to reboot zm

The repeat of the same issue over and over again *always ERR Can't open /var/db/zoneminder/events/n/n/xyz.jpg almost looks like its entered an indefinite loop.

So three questions here...
1. what might be the cause of the "ERR Can't open /var/db/zoneminder/events/4/2020-05-31/1/00038-capture.jpg: No such file or directory zm_eventstream.cpp 679"
2. Why *or how* do you clear the log
3. why is zm_eventstream.cpp spitting the dummy on jpg's that never existed to begin with - is this a known bug where developers got the sequencing wrong when scanning for files i.e starting from 0 (zero) instead of 1 (one) ?

zm-log.txt
log
(31.97 KiB) Downloaded 170 times
User avatar
burger
Posts: 390
Joined: Mon May 11, 2020 4:32 pm

Re: log error

Post by burger »

From your previous post you mentioned you are running ZM on Freenas. It's likely an incomplete deployment by whomever built that package. ZM on freenas is a niche way to use zm.

Sometimes 'no such file or directory' errors are an issue of permissions, but if you are seeing the files being created then it is not that most likely...

If you feel inclined to troubleshoot this, you can look into how the freenas package is built, and see what is configured right or wrong. For the logs not resetting, possibly this is some incorrect setting in apache, but I'm not really sure (could also be the browser). The existing guides on wiki.zoneminder.com/Debian as well as the dpkg pre and postinstall scripts may offer some clues.

You may also be able to ignore the log errors. It may be a superfluous message, and logging on zm can be disabled. This is a good idea if you have an otherwise working system, as logging taxes the system / HDD.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
ghostwolf59
Posts: 19
Joined: Sat Apr 11, 2020 12:46 pm

Re: log error

Post by ghostwolf59 »

I cant see FreeNAS having anything to do with logging going into a spin on a jpg that never ever even got created!

But assuming this is a file expected, why is the log turning this around, and around indefinitely resulting in a significantly overhead when it comes to i/o and processing?

Dont seem right - if there's an issue, then logging ought to cease after n attempts - its not like this error is causing the system to go down!

Check the log I posted and see how the same error keep going into a spin - Never, ever come across this elsewhere! - even though it might be reason to log it, its far from a critical error, yet its deemed ERROR that never cases!

Also, even though I know you technically dont support FreeNAS, its not reasonable that a FreeBSD installation should be ignored when it comes to issues with the software.
If anything, my issues *being the odd one out* might assist developers sorting issues across linux installations.
Last edited by ghostwolf59 on Tue Jun 09, 2020 3:54 pm, edited 2 times in total.
ghostwolf59
Posts: 19
Joined: Sat Apr 11, 2020 12:46 pm

Re: log error

Post by ghostwolf59 »

You may also be able to ignore the log errors. It may be a superfluous message, and logging on zm can be disabled. This is a good idea if you have an otherwise working system, as logging taxes the system / HDD.
How do you turn off logging?

Don't like the idea as a general solution, since there might be other issues cropping up over time. But if you have logging control params similar to how log4j, then I would be interested exactly what to turn on/off or packages that I need/should keep, while ignoring noise like non existing jpg's

The information on logging is far from clear.... https://zoneminder.readthedocs.io/en/1. ... gging.html

The suggestion of adding a config to enable rotating logs, does not even specify where and what file name I should use!
I just scanned the installation looking for any occurance of "zms_" that seem to be to logging naming convention and apart from the logs itself there only binary files listed where the majority points to binary sql files.
So exactly how would I go about limit or tweak the logging - the gui log screen does not offer anything really other than globally tag anything from INF to full DEBUG
User avatar
burger
Posts: 390
Joined: Mon May 11, 2020 4:32 pm

Re: log error

Post by burger »

From webpage console: Options - Logging - Log level - None.

(most, if not all) Logging should be disabled when not in use.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
User avatar
iconnor
Posts: 2879
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: log error

Post by iconnor »

So, to put some actual information in this discussion....

the event path breaks down like so:
/var/db/zoneminder/events/<monitor_id>/<date>/<event id>/
the log file zms_e1 is the logs generated by viewing event # 1. So it's files will be in /var/db/zoneminder/events/4/2020-05-31/1/
ZM thinks that frame 38 got captured and written to disk, so when you view the event, it tries to play each frame and when it gets to frame 38 tries to load the image. Apparently it doesn't exist. That's what we need to investigate. I suspect this is a symptom of a problem during capture. Also, there should never be a frame 00000. If it is complaining about that, there is something seriously wrong.

Next question, what are the settings on the storage tab for this monitor?
Is this happening on other events or is it a one off on event 1?
Exactly which version of ZM is this?

You asked why clear doesn't clear the logs... in 1.34 it should. If the log is really full though it might take literally forever or even die and fail. mysql sucks.
ghostwolf59
Posts: 19
Joined: Sat Apr 11, 2020 12:46 pm

Re: log error

Post by ghostwolf59 »

iconnor wrote: Thu Jun 11, 2020 1:07 pm So, to put some actual information in this discussion....

the event path breaks down like so:
/var/db/zoneminder/events/<monitor_id>/<date>/<event id>/
the log file zms_e1 is the logs generated by viewing event # 1. So it's files will be in /var/db/zoneminder/events/4/2020-05-31/1/
ZM thinks that frame 38 got captured and written to disk, so when you view the event, it tries to play each frame and when it gets to frame 38 tries to load the image. Apparently it doesn't exist. That's what we need to investigate. I suspect this is a symptom of a problem during capture.
Cant answer this - but if you check the log I uploaded initially, you see how it seem to go into a spin, pointing to the same file
Also, there should never be a frame 00000. If it is complaining about that, there is something seriously wrong.
Unfortunately this 00000.jpg ref wasnt part of the log I uploaded, but the same "file or directory dont exists pointing to a 00000.jpg is logged frequently in the same manner as the 000038.jpg is shown in the log I uploaded
Next question, what are the settings on the storage tab for this monitor?
Storage was using "Default" pointing to /var/db/zoneminder/events/ within the jail
The disk is a SSD with 400Gb available for zm
I have since mapped another 6TB disk to allow for more room, but that being a WD RED its clearly slower compared to the ssd.
Is this happening on other events or is it a one off on event 1?
I only have one camera that I am playing around with - at some point I had 3-4 zones defined that would trigger events, but as we speak I now only have one small area mapped that would trigger an event.
Does what it should in terms of picking up and recording, but often I see these errors showing up in the logs.
Exactly which version of ZM is this?
v1.34.9

You asked why clear doesn't clear the logs... in 1.34 it should. If the log is really full though it might take literally forever or even die and fail. mysql sucks.
Seem to be doing to on occasion, but not always, AND(!) you have to press clear like a zillion times to clear things up.

I also noticed this cropping up frequently once I try to clear the logs
"2020-06-13 21:51:13 web_js 26272 ERR TypeError: rows[0] is undefined zm/cache/skins_classic_views_js_log-classic-1586016787.js 179"
User avatar
iconnor
Posts: 2879
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: log error

Post by iconnor »

I highly recommend you update. There have been fixes since .9
ghostwolf59
Posts: 19
Joined: Sat Apr 11, 2020 12:46 pm

Re: log error

Post by ghostwolf59 »

iconnor wrote: Mon Jun 15, 2020 7:21 pm I highly recommend you update. There have been fixes since .9
Update to...? Thought I were on the latest "stable" release... But ok, if there's an update fair enough.

Any idea whats going on here ???? *log errors again*

2020-06-17 00:20:06 web_php 74368 ERR Timed out waiting for msg /var/run/zm/zms-453149s.sock ajax/stream.php 93
2020-06-17 00:20:06 web_php 74368 ERR No data to read from socket includes/functions.php 2170
2020-06-17 00:19:51 web_php 78907 ERR Socket /var/run/zm/zms-453149s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/lat ... window-etc for more information. includes/functions.php 2170
2020-06-16 23:30:15 zma_m4 102951 ERR Shared data not initialised by capture daemon for monitor Front of House zm_monitor.cpp 498
2020-06-16 23:30:15 zmdc 72756 ERR 'zma -m 4' exited abnormally, exit status 255 zmdc.pl
2020-06-16 23:30:13 zma_m4 102314 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 574
2020-06-16 23:30:13 zmdc 72756 ERR 'zma -m 4' exited abnormally, exit status 255 zmdc.pl
2020-06-15 23:30:08 zma_m4 102887 ERR Shared data not initialised by capture daemon for monitor Front of House zm_monitor.cpp 498
2020-06-15 23:30:08 zmdc 25482 ERR 'zma -m 4' exited abnormally, exit status 255 zmdc.pl
2020-06-15 23:30:06 zma_m4 102944 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 574
2020-06-15 23:30:06 zmdc 25482 ERR 'zma -m 4' exited abnormally, exit status 255 zmdc.pl
ghostwolf59
Posts: 19
Joined: Sat Apr 11, 2020 12:46 pm

Re: log error

Post by ghostwolf59 »

iconnor wrote: Mon Jun 15, 2020 7:21 pm I highly recommend you update. There have been fixes since .9
Just tried *pkg upgrade* and no new release made available - a few other packages, but zm still sits as zoneminder-1.34.9
jobsoftinc
Posts: 3
Joined: Mon May 03, 2021 3:29 pm

Re: log error

Post by jobsoftinc »

I agree that ZM should have some means of alerting the admin when an undetected error event is logging like mad, and, for WHATEVER reason, admin doesn't regularly check the logs (or the logs table at the MySQL level). I had such an event, and the otherwise seemingly normal functioning ZM gave me no reason to look until I happened to be addressing another issue and noticed, quite by chance, the logs table was *HUGE* (89 gigs).

After some investigation, I discovered that a corrupt event from Oct 2020 that I thought had been deleted, and was no longer even a thing, had been pumping my logs table almost non-stop since that deletion event (and this particular event was deleted from the Events page too seemingly without error).

So, when I discovered it, I was about to TRUNCATE the logs table when I thought to do a COUNT on this event error message to see just what it had injected into the logs table, and I was flabbergasted!

Code: Select all

| 60162881 | 1602414344.054768 | zms_e106874 |        0 | 102158 |    -2 | ERR  | Can't open /var/db/zoneminder/events/12/2020-10-10/106874/00000-capture.jpg: No such file or directory                                        | zm_eventstream.cpp |  679 |
| 60162882 | 1602414344.227984 | zms_e106874 |        0 | 102053 |    -2 | ERR  | Can't open /var/db/zoneminder/events/12/2020-10-10/106874/00000-capture.jpg: No such file or directory                                        | zm_eventstream.cpp |  679 |
+----------+-------------------+-------------+----------+--------+-------+------+-----------------------------------------------------------------------------------------------------------------------------------------------+--------------------+------+
10 rows in set (9 min 34.71 sec)

dbadmin@localhost [zm]>
dbadmin@localhost [zm]> select COUNT(Id) from logs where message like '%/106874/%';

+-----------+
| COUNT(Id) |
+-----------+
| 916467055 |
+-----------+
1 row in set (3 hours 10 min 50.12 sec)

dbadmin@localhost [zm]>
A simple alert like "Warning: Excessive logging detected" would be nice. Needless to say, the only option was to 'TRUNCATE logs'. :)

FYI and FWIW
MatzR
Posts: 18
Joined: Wed Oct 02, 2019 8:02 am

Re: log error

Post by MatzR »

iconnor wrote: Thu Jun 11, 2020 1:07 pm Also, there should never be a frame 00000. If it is complaining about that, there is something seriously wrong.
Hi @iconnor,

Sorry to pick this up here again. But since I upgraded to 1.34 I have this issue when trying to playback recordings. I have 1.34.14 now (on Debian 11).
Here what I see in the log file:

Code: Select all

"2022-04-20 11:13:14",zms_e200991,,441803,ERR,"Can't send /var/cache/zoneminder/events/2/2022-04-20/200991/00000-capture.jpg: Broken pipe",zm_eventstream.cpp,725
"2022-04-20 11:13:14",zms_e200991,,441803,ERR,"Unable to send stream text frame: Broken pipe",zm_stream.cpp,300
"2022-04-20 11:13:14",zms_e200991,,441803,ERR,"Can't open /var/cache/zoneminder/events/2/2022-04-20/200991/00000-capture.jpg: No such file or directory",zm_eventstream.cpp,1049
Post Reply