Disk full:zmfilter.pl failure, problem and (kludgy) solution

Support and queries relating to all previous versions of ZoneMinder
Locked
Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Disk full:zmfilter.pl failure, problem and (kludgy) solution

Post by Flash_ »

Posted in case anyone else encounters this, also if anyone might shed some light on it for me.

I recently had some stability issues with one of my Zoneminder servers, running v1.22.3. Suspecting software problems I did a "apt-get upgrade". Not much broke immediately and I left it running happily for some days.

It's Debian 'testing'; Linux dobby 2.6.22-3-k7 #1 SMP Mon Nov 12 09:12:50 UTC 2007 i686 GNU/Linux

Some time after, I noticed the events disk was at 100% and new events weren't recording. The machine had been running for over a year so I didn't think anything with zm had changed. I checked the filters and database anyway, all clean. "Fast delete" was enabled. I spent about 10 minutes looking at various things.

Enlightenment came when I ran zmfilter.pl manually.

dobby:~# zmfilter.pl
Insecure $ENV{PATH} while running with -T switch at /usr/share/perl5/Date/Manip/TZ.pm line 590, <DATA> line 335.
Compilation failed in require at /usr/bin/zmfilter.pl line 52, <DATA> line 335.
BEGIN failed--compilation aborted at /usr/bin/zmfilter.pl line 52, <DATA> line 335.

The path for www-data (which zm runs under) is;
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Clearly with zmfilter.pl not working no old events were being expired and the disk filled up.

Needing this server back up pronto, I bodged it and got it running again, but I don't know why this happened after an upgrade.

Fix:
First line of /usr/bin/zmfilter.pl

Replace

#!/usr/bin/perl -wT

With

#!/usr/bin/perl -w

That turns off the taint checking, which reduces security, but I have a closed system. YMMV.

Then...
zmpkg.pl stop
zmfilter.pl -filter=PurgeWhenFull
zmaudit.pl

zmpkg.pl start
watch df

Free space started increasing slowly again.
Locked