Same event stored twice
Same event stored twice
I am not sure what I have done to get this result, but each of my modect events are storing twice under my new storage location. Where do I need to look to fix this?
Re: Same event stored twice
Let's see your monitors. (Console)
Re: Same event stored twice
I think what is happening is that your camera has a large keyframe interval. We always have to start a recording with a keyframe, so we have to rewind in the queue till we find one. I think we are going back to the same start keyframe as event 1.
Maybe increase the minimum event length, or decrease you keyframe interval in the camera.
Maybe increase the minimum event length, or decrease you keyframe interval in the camera.
Re: Same event stored twice
Thanks for the reply! I decreased the key frame interval on the camera to match the frame rate. It was larger than the maximum frame rate, which may mean you have a good point here. I will report back.
Re: Same event stored twice
Unfortunately nothing I did would fix the doubling of events. So I deleted Monitor-1 to recreate the camera setup again with a new Monitor, but now my log is filling up with an error about monitor 1, which of course no longer exists:
What do I do to clean that up?
What I have tried:
Code: Select all
"2024/11/10 - 11:04:36 AKST",zmdc,,59498,ERR,"'zmc -m 1' exited abnormally, exit status 255",zmdc.pl,'-
"2024/11/10 - 11:04:36 AKST",zmc_m1,,101349,ERR,"No monitors found",zmc.cpp,214
"2024/11/10 - 11:04:36 AKST",zmc_m1,,101349,ERR,"Can't use query result:",zm_monitor.cpp,903
"2024/11/10 - 11:04:36 AKST",zmc_m1,,101349,ERR,"Bogus number of lines return from query, 0 returned for query SELECT `Id`, `Name`, `ServerId`, `StorageId`, `Type`, `Function`+0, `Enabled`, `DecodingEnabled`, `LinkedMonitors`, `AnalysisFPSLimit`, `AnalysisUpdateDelay`, `MaxFPS`, `AlarmMaxFPS`,`Device`, `Channel`, `Format`, `V4LMultiBuffer`, `V4LCapturesPerFrame`, `Protocol`, `Method`, `Options`, `User`, `Pass`, `Host`, `Port`, `Path`, `SecondPath`, `Width`, `Height`, `Colours`, `Palette`, `Orientation`+0, `Deinterlacing`, `DecoderHWAccelName`, `DecoderHWAccelDevice`, `RTSPDescribe`, `SaveJPEGs`, `VideoWriter`, `EncoderParameters`, `OutputCodec`, `Encoder`, `OutputContainer`, `RecordAudio`, `Brightness`, `Contrast`, `Hue`, `Colour`, `EventPrefix`, `LabelFormat`, `LabelX`, `LabelY`, `LabelSize`,`ImageBufferCount`, `MaxImageBufferCount`, `WarmupCount`, `PreEventCount`, `PostEventCount`, `StreamReplayBuffer`, `AlarmFrameCount`, `SectionLength`, `MinSectionLength`, `FrameSkip`, `MotionFrameSkip`, `FPSReportInterval`, `RefBlendPerc`, `AlarmRefBlendPerc`, `TrackMotion`, `Exif`,`RTSPServer`, `RTSPStreamName`,`SignalCheckPoints`, `SignalCheckColour`, `Importance`-1 FROM `Monitors` WHERE Id=1.",zm_db.cpp,154
What I have tried:
- Searching the Wiki for deleting a monitor - no joy (maybe I just missed it)
- Restarting ZM - no joy
- Running zmaudit.pl - no joy
Re: Same event stored twice
I don't know why it didn't auto-stop the dead monitor, but just restart zoneminder
Re: Same event stored twice
As I noted above, I did restart ZM. I just now did a full stop then start and am still getting this error:
Next suggestion, please.
Code: Select all
"2024/11/11 - 06:32:06 AKST",zmdc,,59498,ERR,"'zmc -m 1' exited abnormally, exit status 255",zmdc.pl,'-
"2024/11/11 - 06:32:06 AKST",zmc_m1,,104839,ERR,"No monitors found",zmc.cpp,214
"2024/11/11 - 06:32:06 AKST",zmc_m1,,104839,ERR,"Can't use query result:",zm_monitor.cpp,903
"2024/11/11 - 06:32:06 AKST",zmc_m1,,104839,ERR,"Bogus number of lines return from query, 0 returned for query SELECT `Id`, `Name`, `ServerId`, `StorageId`, `Type`, `Function`+0, `Enabled`, `DecodingEnabled`, `LinkedMonitors`, `AnalysisFPSLimit`, `AnalysisUpdateDelay`, `MaxFPS`, `AlarmMaxFPS`,`Device`, `Channel`, `Format`, `V4LMultiBuffer`, `V4LCapturesPerFrame`, `Protocol`, `Method`, `Options`, `User`, `Pass`, `Host`, `Port`, `Path`, `SecondPath`, `Width`, `Height`, `Colours`, `Palette`, `Orientation`+0, `Deinterlacing`, `DecoderHWAccelName`, `DecoderHWAccelDevice`, `RTSPDescribe`, `SaveJPEGs`, `VideoWriter`, `EncoderParameters`, `OutputCodec`, `Encoder`, `OutputContainer`, `RecordAudio`, `Brightness`, `Contrast`, `Hue`, `Colour`, `EventPrefix`, `LabelFormat`, `LabelX`, `LabelY`, `LabelSize`,`ImageBufferCount`, `MaxImageBufferCount`, `WarmupCount`, `PreEventCount`, `PostEventCount`, `StreamReplayBuffer`, `AlarmFrameCount`, `SectionLength`, `MinSectionLength`, `FrameSkip`, `MotionFrameSkip`, `FPSReportInterval`, `RefBlendPerc`, `AlarmRefBlendPerc`, `TrackMotion`, `Exif`,`RTSPServer`, `RTSPStreamName`,`SignalCheckPoints`, `SignalCheckColour`, `Importance`-1 FROM `Monitors` WHERE Id=1.",zm_db.cpp,154
Re: Same event stored twice
The only thing I can think of would be if there was a rogue process left behind. CHeck for two zmdc.pl or two zmwatch.pl in ps | grep zm
sudo zmdc.pl status
Will tell us if the currently talking zmdc thinks it should be running zmc -m 1. To stop it we can do sudo zmdc.pl stop zmc -m 1. But something else like zmwatch.pl might restart it.
sudo zmdc.pl status
Will tell us if the currently talking zmdc thinks it should be running zmc -m 1. To stop it we can do sudo zmdc.pl stop zmc -m 1. But something else like zmwatch.pl might restart it.
Re: Same event stored twice
Thanks for the hints. I should have thought to check the process list myself. Doh!
For clarity this is a FreeBSD 13.4-RELEASE system. I ran top and watched the www user processes, which is nginx and ZoneMinder, then stopped ZoneMinder and nginx. Imagine my surprise to find several ZoneMinder zombie processes still running, including six zmc processes for two cameras , and showing up in top after both services were stopped. Now I know why the CPU load seemed higher than it should be.
To "fix" it, at the CLI where I logged in as root, I used:
That got rid of all the remaining processes except for php-fpm, whcih respawned new processes on new PIDs. I am guessing that is normal at this point and just left those. Then I restarted ZoneMinder and nginx to see what popped up. Looks "normal" in top now and only showing two zmc processes for two cameras, which is what I expect.
It appears the service zoneminder stop and service zoneminder restart on the FreeBSD port are not completing a stop of the previous processes for ZoneMinder. Now that I know that, I can make sure I use stop and verify the processes are gone before I start the service again.
For clarity this is a FreeBSD 13.4-RELEASE system. I ran top and watched the www user processes, which is nginx and ZoneMinder, then stopped ZoneMinder and nginx. Imagine my surprise to find several ZoneMinder zombie processes still running, including six zmc processes for two cameras , and showing up in top after both services were stopped. Now I know why the CPU load seemed higher than it should be.
To "fix" it, at the CLI where I logged in as root, I used:
Code: Select all
pkill -U www
It appears the service zoneminder stop and service zoneminder restart on the FreeBSD port are not completing a stop of the previous processes for ZoneMinder. Now that I know that, I can make sure I use stop and verify the processes are gone before I start the service again.
Re: Same event stored twice
For future me, and anyone else needing this info, make sure these services are up and running on the FreeBSD port:
- mysql-server
- fcgiwrap
- php_fpm
- nginx
- zoneminder
Re: Same event stored twice
Hmm... I may try to find some time to look into this. All processes are managed by zmdc and should kill them all. Perhaps something is different on freebsd.
Re: Same event stored twice
Well, since FreeBSD is not Linux, it is definitely different from Linux. All of the base tools installed with the base OS are not GNU. Only add-in packages from ports may be GNU. For example the pkill in FreeBSD base is BSD licensed and has different switches than the pkill used in many Linux distributions. So that is one difference.
Re: Same event stored twice
I took a quick look and the init script just wraps zmpkg.pl which should be fine. I did some start/stops and all the processes started/died appropriately... so not simple to replicate.