No end times for recorded events - WILL PAY MONEY TO FIX THIS

Discussions related to the 1.36.x series of ZoneMinder
Corvus85
Posts: 27
Joined: Sun Jun 27, 2021 4:12 pm

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by Corvus85 »

Magic919 wrote: Mon Jul 12, 2021 8:19 am Unraid is the OS here.

There is no VM, but the Docker container is the closest thing to that. Bit like a VM with no kernel, as it uses the kernel of the OS on the host.
Yes, correct.

For all intents and purposes, treat it as a VM.

Any takers?
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by SteveGilvarry »

Out of interest does it work correctly when you are not flipping switches with Record and Monitor mode? Like put the camera on record and let it reach an end point on its own and write the event out. I think the default is 600 seconds, but you can check it in Section Length on the Misc tab of the Monitor, which you get to by clicking the camera IP in the Source column. If you are typical 5 year old you will want to set that to 30 seconds to match attention span.

Are you able to find the logs for zoneminder in the container? I don't use Docker that much, but hey I am 40 years older than 5 year old you so I can read some docs and see if I can help. If you can find them, have a look at them and see if you can find messages from zmc or other zm.... messages. People asking you to grep are saying run something like "cat syslog | grep zmc". If you can't make heads or tails use something like pastebin to share them.

If you can't find them, then google how. I take it you are using the dlandon-unraid docker? No changes?

Unrelated note on what you are doing...
Also for triggering events externally you may want to run the camera in Nodect (See Functions) https://zoneminder.readthedocs.io/en/st ... onitor-tab
Then you would trigger it using API https://zoneminder.readthedocs.io/en/st ... m-monitors
I thought someone already did all this for home-assistant, but maybe not the trigger.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Corvus85
Posts: 27
Joined: Sun Jun 27, 2021 4:12 pm

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by Corvus85 »

SteveGilvarry wrote: Sat Jul 17, 2021 11:57 am Out of interest does it work correctly when you are not flipping switches with Record and Monitor mode? Like put the camera on record and let it reach an end point on its own and write the event out. I think the default is 600 seconds, but you can check it in Section Length on the Misc tab of the Monitor, which you get to by clicking the camera IP in the Source column. If you are typical 5 year old you will want to set that to 30 seconds to match attention span.
I know you're being condescending, but I actually don't even care because at least you're suggesting things. Feel free to be as condescending as you like, so long as you're being helpful. My first priority is fixing this, not my ego.

So I set the section length to 30 seconds, and after leaving it for a few minutes, I switched it back to 'monitor' and had a look in my events list. It's... confusing. Some sections show end times, others don't. See attached.
Are you able to find the logs for zoneminder in the container? I don't use Docker that much, but hey I am 40 years older than 5 year old you so I can read some docs and see if I can help. If you can find them, have a look at them and see if you can find messages from zmc or other zm.... messages. People asking you to grep are saying run something like "cat syslog | grep zmc". If you can't make heads or tails use something like pastebin to share them.
If you can't find them, then google how. I take it you are using the dlandon-unraid docker? No changes?
I found them by clicking the docker container icon and selecting 'logs' after shutting down the docker.
Here's the pastebin: https://pastebin.com/CwMStE5Q
Unrelated note on what you are doing...
Also for triggering events externally you may want to run the camera in Nodect (See Functions) https://zoneminder.readthedocs.io/en/st ... onitor-tab
Then you would trigger it using API https://zoneminder.readthedocs.io/en/st ... m-monitors
I thought someone already did all this for home-assistant, but maybe not the trigger.
How would I enter that web command in the API page into an automation as an action in HomeAssistant?
Attachments
Screenshot 2021-07-18 121653.jpg
Screenshot 2021-07-18 121653.jpg (230.83 KiB) Viewed 8319 times
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by SteveGilvarry »

Geez you said treat you like a 5 year old, I have a little fun and you complain. But look we managed to get you past the first hurdle and can see you have an issue being logged. Now I am going super simple as I really have no idea of your ability or experience. If you say I am comfortable with Linux CLI I will be less descriptive.

So we can see from the logs that you are getting some crashes of zmc as Isaac said. I assume you did grep zmc, since that is the only thing in the log. Now the first issue I see is the "INF ['zmc -m 1' crashed, signal 8]" it is occurring for some of these events, I think all the ones with duration 00:00:00 are crashing out. You can read the Event being created, then the crash occurring after that. So you will need to turn on some debug logs for that monitor to see why it is crashing. Try setting debug for that monitor in options -> logging to debug zmc. Like I have below you debug LOG_DEBUG_TARGET _zmc_m1, only thing I haven't done is tick the box LOG_DEBUG. This will then create some log files for each time zmc runs in the folder shown in LOG_DEBUG_FILE, the correct ones will have a random number next to them and match the time you are testing. You may have to SSH into the container to get these files.
Don't leave debug ticked as that will kill your system.
Screen Shot 2021-07-18 at 2.27.43 pm.png
Screen Shot 2021-07-18 at 2.27.43 pm.png (47.52 KiB) Viewed 8303 times
Event 21 was interesting it appears to close out correctly albeit 15 seconds longer than it should be, but has no end time either. Is there anything around that time in the log that is also complaining? I wonder if some settings on the monitor? Can you screenshot and share them? Or just a general performance issues are impacting.

Also have you got a linked monitor 2 Test 1 - Substream? Maybe just unlink that for now and set to None, not sure if it is causing any issues but let's keep it simple for now.

Hopefully once we get the debug logs it will be clearer what is happening and some others can chime in.

Hold fire on how you interact for now, I thought you were doing your own code to trigger, but I suspect you are using https://www.home-assistant.io/integrations/zoneminder. But if we can get ZM doing it's own thing OK first then we can come back to this.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Corvus85
Posts: 27
Joined: Sun Jun 27, 2021 4:12 pm

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by Corvus85 »

SteveGilvarry wrote: Sun Jul 18, 2021 5:07 am Geez you said treat you like a 5 year old, I have a little fun and you complain. But look we managed to get you past the first hurdle and can see you have an issue being logged. Now I am going super simple as I really have no idea of your ability or experience. If you say I am comfortable with Linux CLI I will be less descriptive.
Not complaining at all. Please continue being as condescending as you like, so long as you help. This is not sarcasm by the way. I just want this fixed.
So we can see from the logs that you are getting some crashes of zmc as Isaac said. I assume you did grep zmc, since that is the only thing in the log. Now the first issue I see is the "INF ['zmc -m 1' crashed, signal 8]" it is occurring for some of these events, I think all the ones with duration 00:00:00 are crashing out. You can read the Event being created, then the crash occurring after that. So you will need to turn on some debug logs for that monitor to see why it is crashing. Try setting debug for that monitor in options -> logging to debug zmc. Like I have below you debug LOG_DEBUG_TARGET _zmc_m1, only thing I haven't done is tick the box LOG_DEBUG. This will then create some log files for each time zmc runs in the folder shown in LOG_DEBUG_FILE, the correct ones will have a random number next to them and match the time you are testing. You may have to SSH into the container to get these files.
Don't leave debug ticked as that will kill your system.
Screen Shot 2021-07-18 at 2.27.43 pm.png
1. what is 'grep zmc'?
2. what is 'zmc'?
3. I'm confused. Should I tick the 'log_debug' checkbox or not? You're telling me if I do, it'll kill my system.
Event 21 was interesting it appears to close out correctly albeit 15 seconds longer than it should be, but has no end time either. Is there anything around that time in the log that is also complaining? I wonder if some settings on the monitor? Can you screenshot and share them? Or just a general performance issues are impacting.
Any particular page you need me to screenshot? Or all of the settings menu pages related to that monitor?
Also have you got a linked monitor 2 Test 1 - Substream? Maybe just unlink that for now and set to None, not sure if it is causing any issues but let's keep it simple for now.
Not that I know of. 'Test 1 - Substream' only has 1 event logged for it. As far as I know, they aren't linked. How would I check?
Hopefully once we get the debug logs it will be clearer what is happening and some others can chime in.

Hold fire on how you interact for now, I thought you were doing your own code to trigger, but I suspect you are using https://www.home-assistant.io/integrations/zoneminder. But if we can get ZM doing it's own thing OK first then we can come back to this.
Will do.
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by SteveGilvarry »

No worries mate happy to help someone who is appreciative of the assistance.
1. Google Grep for better description but the idea of "cat syslog | grep zmc" was to only output lines of your log file that matches the pattern zmc. I was assuming you did that as the only outputs in your pastebin link were zmc lines from the log. But just post the full log files now.
2. zmc is the process that is connecting and recording your camera and crashing as indicated by the logs. https://zoneminder.readthedocs.io/en/st ... components
3. Sorry I wasn't that clear, Don't leave debug ticked as that will kill (slow down) your system if left ticked after testing. But tick it run the test and then untick it. https://zoneminder.readthedocs.io/en/st ... ns-logging
4. Screenshot Monitor Source, Buffers and Misc menu pages
5. I asked about linked monitors mainly as some people run a lower resolution sub stream for detection (uses less resources) and then record the mainstream. I asked mainly due to your naming of the cameras as mainstream and sub stream. Linked Monitors setting is on the general tab of each monitor. But if you didn't change them or try to setup like that then probably not the case. I did notice that it is happily running in Monitor mode without issue. Have you tried setting that second monitor to record and see what happens like the other test you did on the first monitor?
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Corvus85
Posts: 27
Joined: Sun Jun 27, 2021 4:12 pm

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by Corvus85 »

SteveGilvarry wrote: Sun Jul 18, 2021 12:08 pm No worries mate happy to help someone who is appreciative of the assistance.
Thank you for the assistance. Happy to throw a donation your way after this is all over.
1. Google Grep for better description but the idea of "cat syslog | grep zmc" was to only output lines of your log file that matches the pattern zmc. I was assuming you did that as the only outputs in your pastebin link were zmc lines from the log. But just post the full log files now.
2. zmc is the process that is connecting and recording your camera and crashing as indicated by the logs. https://zoneminder.readthedocs.io/en/st ... components
3. Sorry I wasn't that clear, Don't leave debug ticked as that will kill (slow down) your system if left ticked after testing. But tick it run the test and then untick it. https://zoneminder.readthedocs.io/en/st ... ns-logging
Ok here's what I did. I checked 'switch debug logging on', entered '_zmc_m1' into the box 'LOG_DEBUG_TARGET', then saved. Then I set the monitor from 'monitor' to 'record'. Then I left it running for 2 minutes. Then I switched it from 'record' to 'monitor' again, then unticked 'switch debug logging on', and erased '_zmc_m1' and saved. Then I stopped the Zoneminder container, opened the logs, selected all, and pasted it here:
https://pastebin.com/4bDmvtxH
4. Screenshot Monitor Source, Buffers and Misc menu pages
See attached.

5. I asked about linked monitors mainly as some people run a lower resolution sub stream for detection (uses less resources) and then record the mainstream. I asked mainly due to your naming of the cameras as mainstream and sub stream. Linked Monitors setting is on the general tab of each monitor. But if you didn't change them or try to setup like that then probably not the case. I did notice that it is happily running in Monitor mode without issue. Have you tried setting that second monitor to record and see what happens like the other test you did on the first monitor?
[/quote]

I haven't tried before, but I just tried, and again - no end time.
Here's the logs from the second I manually changed it to 'record'.
https://pastebin.com/30nvMfp0
Attachments
Screenshot 2021-07-18 225038.jpg
Screenshot 2021-07-18 225038.jpg (80.32 KiB) Viewed 8247 times
Screenshot 2021-07-18 225059.jpg
Screenshot 2021-07-18 225059.jpg (58.89 KiB) Viewed 8247 times
Screenshot 2021-07-18 225116.jpg
Screenshot 2021-07-18 225116.jpg (104.04 KiB) Viewed 8247 times
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by SteveGilvarry »

Remove DecoderHWAccelName = Cuda from Monitor as that is only throwing an error. Not the one stopping it working but still something less to clutter logs.

OK so looks like you cannot logon to the container, not sure if that is specific to Unraid. Or just you don't know how, but I am not that across it either. Normally you would be looking at log files in /var/log/zm folder in the OS, but if the container doesn't map that out then you have to SSH into it. But we can try something else.
The logs still don't have any debug events in them, see all the INF, WAR and ERR after the colon in the files you are posting? So back to options -> Logging and check first entry LOG_LEVEL_SYSLOG is that set to Warning? If so change it to DEBUG, save and then restart ZM (Should be OK using the ZM GUI to do it, top right where is says running). If Syslog is not set to warning is one of the other options set to that?
Basically it looks like maybe the container is exposing syslog to unraid somehow when you stop it, so if we get the Debug logs to write to syslog then you might see them. You will know as you will see a crap load of DEBUG (maybe DBG if it shortens it), but you will get a lot more than just Capturing at x.xxfps messages.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Corvus85
Posts: 27
Joined: Sun Jun 27, 2021 4:12 pm

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by Corvus85 »

SteveGilvarry wrote: Sun Jul 18, 2021 1:37 pm Remove DecoderHWAccelName = Cuda from Monitor as that is only throwing an error. Not the one stopping it working but still something less to clutter logs.
Ok done.
OK so looks like you cannot logon to the container, not sure if that is specific to Unraid. Or just you don't know how, but I am not that across it either. Normally you would be looking at log files in /var/log/zm folder in the OS, but if the container doesn't map that out then you have to SSH into it. But we can try something else.
I don't really know how to navigate the CLI in SSH.. I mean, I can log into it using Putty on my Windows machine, but no idea past that.
The logs still don't have any debug events in them, see all the INF, WAR and ERR after the colon in the files you are posting? So back to options -> Logging and check first entry LOG_LEVEL_SYSLOG is that set to Warning? If so change it to DEBUG, save and then restart ZM (Should be OK using the ZM GUI to do it, top right where is says running). If Syslog is not set to warning is one of the other options set to that?
LOG_LEVEL_SYSLOG is currently set to 'INFO'. I've changed it to DEBUG and restarted the Zoneminder container.
LOG_LEVEL_FILE is currently set to DEBUG.
LOG_LEVEL_WEBLOG is currently set to NONE.
LOG_LEVEL_WEBLOG is currently set to INFO.

What next? Do I switch LOG_DEBUG back on and switch the monitor to RECORD again?
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by SteveGilvarry »

Yep turn it back on and do another test see if we get some debug entries in the log.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Corvus85
Posts: 27
Joined: Sun Jun 27, 2021 4:12 pm

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by Corvus85 »

SteveGilvarry wrote: Mon Jul 19, 2021 5:54 am Yep turn it back on and do another test see if we get some debug entries in the log.
So I just did that and... I don't think it did anything different. The logs are still full of 'INF' type entries.
https://pastebin.com/Sx026XbZ

I've even loaded up Krusader (GUI file management container) in Unraid, and navigated to the /var/log/ directory and there is no /zm/ subdirectory. Not sure if I'm looking in the right place though.

What next?
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by SteveGilvarry »

I think I will have to install Unraid and see I can do some instructions, very challenging teaching someone how to use Linux via a forum.
You got discord or slack? Maybe we can swap to one of them and DM, and maybe a remote session if that helps.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Corvus85
Posts: 27
Joined: Sun Jun 27, 2021 4:12 pm

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by Corvus85 »

SteveGilvarry wrote: Mon Jul 19, 2021 6:59 am I think I will have to install Unraid and see I can do some instructions, very challenging teaching someone how to use Linux via a forum.
You got discord or slack? Maybe we can swap to one of them and DM, and maybe a remote session if that helps.
I'd really appreciate that.
Sure, I've got Discord. I've only ever used it once though. What's your username?
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by SteveGilvarry »

Join here
https://discord.gg/nZ3rBs8a

Give me a couple of days to setup unraid and zm container, mainly as I am busy at the moment.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Corvus85
Posts: 27
Joined: Sun Jun 27, 2021 4:12 pm

Re: No end times for recorded events - WILL PAY MONEY TO FIX THIS

Post by Corvus85 »

SteveGilvarry wrote: Mon Jul 19, 2021 10:03 am Join here
https://discord.gg/nZ3rBs8a

Give me a couple of days to setup unraid and zm container, mainly as I am busy at the moment.
Cool, I just joined. Thanks!

No problem, let me know when you get around to it.
Post Reply