Events will not delete

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
blah_blah
Posts: 6
Joined: Tue Aug 11, 2020 10:29 pm

Events will not delete

Post by blah_blah »

Hello,
I've installed and run ZM on a couple of boxes and each time I've had the same troubles, I cannot get events to delete. Tech savvy but linux skills are 4/10. I have to look up how to do anything other than basic tasks but I can figure it out with help.

Clean install of Debian 10

ZM installed as shown here: No problems
https://wiki.zoneminder.com/Debian_10_B ... om_ZM_Repo

ZM will fill up my disk as designed and I've setup a filter to delete the following. (Unarchived && disk > 50% && storage area = Events)
Events = /home/zoneminder/events

The log entries are as follows:
2020-08-11 18:40:17 zmfilter_1 725 ERR Unable to delete event 331 as previous operations failed zmfilter.pl
2020-08-11 18:40:17 zmfilter_1 725 ERR Command '0 /home/zoneminder/events/2/2020-08-10/331' exited with status: 72057594037927935 zmfilter.pl
2020-08-11 18:39:17 zmfilter_1 725 ERR Unable to delete event 331 as previous operations failed zmfilter.pl
2020-08-11 18:39:16 zmfilter_1 725 ERR Command '0 /home/zoneminder/events/2/2020-08-10/331' exited with status: 72057594037927935 zmfilter.pl
2020-08-11 18:38:15 zmfilter_1 725 ERR Unable to delete event 331 as previous operations failed zmfilter.pl
2020-08-11 18:38:15 zmfilter_1 725 ERR Command '0 /home/zoneminder/events/2/2020-08-10/331' exited with status: 72057594037927935 zmfilter.pl
2020-08-11 18:37:14 zmfilter_1 725 ERR Unable to delete event 328 as previous operations failed zmfilter.pl
2020-08-11 18:37:14 zmfilter_1 725 ERR Command '0 /home/zoneminder/events/2/2020-08-10/328' exited with status: 72057594037927935 zmfilter.pl

The filters are running but they cannot remove the files. I've played with file permissions, setting /home/zoneminder/events to 777 doesn't change anything.

It seems like getting filters to work is a common problem and I'd like to get past this so that I can learn more about ZM.
Thanks
User avatar
iconnor
Posts: 3373
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Events will not delete

Post by iconnor »

What other operations have you turned on? I isn't trying to delete because the previous operation failed.
blah_blah
Posts: 6
Joined: Tue Aug 11, 2020 10:29 pm

Re: Events will not delete

Post by blah_blah »

By operations do you mean filters? The 'Update Disk Space' is assigned as filter 2 and is is configured as follows.
DiskSpace IS NULL
Thanks


Unedited LOG as follows:

2020-08-11 20:26:44 zma_m1 43180 INF Front House Camera: 26600 - Analysing at 7.14 fps zm_monitor.cpp 1301
2020-08-11 20:26:43 zmc_m2 24663 INF Rear House Camera: images:275800 - Capturing at 20.00 fps, capturing bandwidth 274166bytes/sec zm_monitor.cpp 2544
2020-08-11 20:26:40 zmc_m1 24726 INF Front House Camera: images:236400 - Capturing at 20.00 fps, capturing bandwidth 133790bytes/sec zm_monitor.cpp 2544
2020-08-11 20:26:40 zmpkg 50107 INF Command: start zmpkg.pl
2020-08-11 20:26:39 zmpkg 50107 INF Sanity checking States table... zmpkg.pl
2020-08-11 20:26:39 zma_m2 43179 INF Rear House Camera: 35700 - Analysing at 20.00 fps zm_monitor.cpp 1301
2020-08-11 20:26:38 zmc_m2 24663 INF Rear House Camera: images:275700 - Capturing at 20.00 fps, capturing bandwidth 355282bytes/sec zm_monitor.cpp 2544
2020-08-11 20:26:36 zmfilter_1 725 INF Executing '0 /home/zoneminder/events/1/2020-08-11/535' zmfilter.pl
2020-08-11 20:26:36 zmfilter_1 725 ERR Command '0 /home/zoneminder/events/1/2020-08-11/535' exited with status: 72057594037927935 zmfilter.pl
2020-08-11 20:26:36 zmfilter_1 725 ERR Unable to delete event 535 as previous operations failed zmfilter.pl
2020-08-11 20:26:36 zmfilter_1 725 WAR DiskSpace: Event does not exist at /home/zoneminder/events/1/2020-08-11/535:ZoneMinder::Event: Cause => Continuous EndTime => 2020-08-11 11:35:26 Frames => 3781 Height => 2160 Id => 535 Length => 600.00 MonitorId => 1 Name => Event- 535 Orientation => ROTATE_0 SaveJPEGs => 3 Scheme => Medium StartTime => 2020-08-11 11:25:26 StateId => 1 StorageId => 2 Width => 3840 zmfilter.pl
User avatar
iconnor
Posts: 3373
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Events will not delete

Post by iconnor »

No I mean what other actions have you checked off for it to. There must be something other than Delete.
blah_blah
Posts: 6
Joined: Tue Aug 11, 2020 10:29 pm

Re: Events will not delete

Post by blah_blah »

Archive all matches
X - Update used disk space
Create video for all matches
X - Execute command on all matches
X - Delete all matches
Copy all matches
Move all matches
X - Run filter in background
Run filter concurrently
blah_blah
Posts: 6
Joined: Tue Aug 11, 2020 10:29 pm

Re: Events will not delete

Post by blah_blah »

Debian10 / ZM 1.34.20
I've re-installed (again) following the Zoneminder Wiki and performed the setup as per the DigitalOcean instructions. My console is running error free and I'm recording video.

The problem is that the filters are not running on their own and the delete filter isn't deleting. The logs show no filter/filtering events at any interval.

To troubleshoot I followed the guide to manually run zmfilters.pl from the command line.
sudo zmfilter.pl --filter_id=2
2020-08-27 11:49:53.401496 zmfilter_2[2337].INF [main:180] [Scanning for events using filter id '2']

If I manually 'execute' the filter from the web interface, it runs (as seen from the logs) but doesn't delete any files although it returns a deletion 'target file' on the web interface when I list matches.

Why isn't the filtering running in the background (to be seen in the logs?) and why is the deletion not taking place when the filter is run manually?
User avatar
iconnor
Posts: 3373
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Events will not delete

Post by iconnor »

Yeah uncheck the execute command. You didn't give it a valid command to perform so it is failing. Also you are deleting the file, so there is no need to UpdateDiskSpace.

Each option there is a separate distinct command. If any of them fail the delete won't happen because it is destructive.
blah_blah
Posts: 6
Joined: Tue Aug 11, 2020 10:29 pm

Re: Events will not delete

Post by blah_blah »

Thanks, I figured out that the selections were executed sequentially.

I came home today to find that the delete filter had started working. What I don't understand is why it starts working after 24r elapses or so. The FILTER_EXECUTE_INTERVAL=60 (seconds?) so I don't expect this behaviour. I would expect the logs to show zmfilter_X to be checking every 60sec but I don't see this.
Thanks
blah_blah
Posts: 6
Joined: Tue Aug 11, 2020 10:29 pm

Re: Events will not delete

Post by blah_blah »

I let the system run and the next day the events started deleting as expected...
Post Reply