Time Issue & Filters Not Deleting
Time Issue & Filters Not Deleting
Hello, I am using the FreeNAS plugin version of ZM on the latest version of FreeNAS 11.2 U2.1 with ZM version 1.32.3 installed. I have a system configured and recording events (h264 passthrough) with only two issues.
1. The first issue is related to the incorrect time being recognized in the logs. Although recorded events and live feeds show the correct time in the event list and on the event recording overlay, the time shown in the log section is off by 4 hours. I am located in the same timezone as New York. My timezone is and has been set correctly in FreeNAS and on my networking gear. I am thinking that this could be an issue with UTC being set somewhere, but I cannot find anywhere to change the timezone. I am not sure but maybe the MySQL instance has the wrong timezone set? Any thoughts on this?
2. The second issue is related to events not being deleted by filters. I have tried using the built in Purge filter as well as creating my own filters to automatically delete events, but cannot get the events to delete. I know that my filters are set correctly and saved as they do show the correct results when using the "Execute" command or the "List Matches" button. I am not sure if this could be a permission issue or something else. The only other thing is that I am storing events to a different location on the FreeNAS server than in the default location. The added folder is named "ZM-Storage" and should have sufficient permissions for deleting as events are being saved there without issue. I have also tried enabling "OPT_FAST_DELETE" to see if the events would at least be removed from ZM and the database, but this did not work. I am really thinking that this may be a MySQL or database issue. Any thoughts would be greatly appreciated.
I am happy to provide log files, just let me know what logs files I need to export.
1. The first issue is related to the incorrect time being recognized in the logs. Although recorded events and live feeds show the correct time in the event list and on the event recording overlay, the time shown in the log section is off by 4 hours. I am located in the same timezone as New York. My timezone is and has been set correctly in FreeNAS and on my networking gear. I am thinking that this could be an issue with UTC being set somewhere, but I cannot find anywhere to change the timezone. I am not sure but maybe the MySQL instance has the wrong timezone set? Any thoughts on this?
2. The second issue is related to events not being deleted by filters. I have tried using the built in Purge filter as well as creating my own filters to automatically delete events, but cannot get the events to delete. I know that my filters are set correctly and saved as they do show the correct results when using the "Execute" command or the "List Matches" button. I am not sure if this could be a permission issue or something else. The only other thing is that I am storing events to a different location on the FreeNAS server than in the default location. The added folder is named "ZM-Storage" and should have sufficient permissions for deleting as events are being saved there without issue. I have also tried enabling "OPT_FAST_DELETE" to see if the events would at least be removed from ZM and the database, but this did not work. I am really thinking that this may be a MySQL or database issue. Any thoughts would be greatly appreciated.
I am happy to provide log files, just let me know what logs files I need to export.
Re: Time Issue & Filters Not Deleting
For the first question - yes, looks like your mysql using UTC time (or maybe only log_timestamps variable set to UTC).
https://stackoverflow.com/questions/930 ... e-of-mysql
https://stackoverflow.com/questions/351 ... e-of-mysql
https://stackoverflow.com/questions/930 ... e-of-mysql
https://stackoverflow.com/questions/351 ... e-of-mysql
Re: Time Issue & Filters Not Deleting
I logged into MySQL and checked the timezone and current time and it is being reported correctly by MySQL (the time is off by a few minutes, but this is more or less correct). I checked to see if I could change the "log_timestamps" variable, but MySQL reports that this variable doe not exist. Additionally, changing the my.cnf file as the referenced link suggested breaks MySQL. I am thinking that there must be another variable or a different way to change this that won't break MySQL or ZM.andrew-yu wrote: ↑Tue Mar 19, 2019 5:58 am For the first question - yes, looks like your mysql using UTC time (or maybe only log_timestamps variable set to UTC).
https://stackoverflow.com/questions/930 ... e-of-mysql
https://stackoverflow.com/questions/351 ... e-of-mysql
Re: Time Issue & Filters Not Deleting
Regarding the issue with the ZMFilter. Please see the reference error log lines below:
Also, notice that the time is also off in this error log as well. I am thinking that these could be linking issues.
Also, notice that the time is also off in this error log as well. I am thinking that these could be linking issues.
Re: Time Issue & Filters Not Deleting
Okay, so I think I figured out the issue for the log times. It looks like the timezone in the "php.ini" needed to be set to match FreeNAS and MySQL.
In the FreeNAS plugin the "php.ini" file is located at "/iocage/jails/zoneminder/root/usr/local/etc/php.ini"
This helped me find the solution for #1:
https://github.com/ZoneMinder/zoneminde ... -449013998
I am still looking into the issue with the filters not working, but could use some help or direction if anyone has any ideas. Please see my above post for more details and a error message related to the issue.
In the FreeNAS plugin the "php.ini" file is located at "/iocage/jails/zoneminder/root/usr/local/etc/php.ini"
This helped me find the solution for #1:
https://github.com/ZoneMinder/zoneminde ... -449013998
I am still looking into the issue with the filters not working, but could use some help or direction if anyone has any ideas. Please see my above post for more details and a error message related to the issue.
Re: Time Issue & Filters Not Deleting
Anyone have any thoughts about how to fix the filters not working issue on ZM plugin 1.32.3 on FreeNAS 11.2 U2.1?
Re: Time Issue & Filters Not Deleting
I am also having the same issue with files not being purged/deleted off my disk. It is 100% full, and the only way I can clean it up is to manually delete them, which is of course stupid.
Re: Time Issue & Filters Not Deleting
I'm still having this issue with the plugin. Anyone have any fix ideas?
Re: Time Issue & Filters Not Deleting
Same here, on Debian, no way to make it work, even with storage area defined on Purge Filter, chmod 777 on every file and folder. Tried everything, just doesn't work!
Re: Time Issue & Filters Not Deleting
Just had same issue since fresh install a couple of days ago, every 10mins i would get a alert about zmfilter.pl. I took a look in my apache error log (/var/log/apache2/error.log) and found this:
Fixed it on ubuntu by:-Can't locate Number/Bytes/Human.pm in @INC (you may need to install the Number::Bytes::Human module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/ZoneMinder/Event.pm line 39.
Compilation failed in require at /usr/bin/zmfilter.pl line 92.
Code: Select all
sudo apt install libnumber-bytes-human-perl
Re: Time Issue & Filters Not Deleting
Ortelious, thank you, your answer fixed it immediately.
Re: Time Issue & Filters Not Deleting
I finally figured out the fix for the filters! I know have the zoneminder plugin working 100%! To fix the filters issue I found that I needed to finish setting up PERL and install MIME. To do this I SSH'd into my zoneminder plugin's jail and ran the following:
Accept the defaults and don't install any new bundles for now. Then once the initial config is over just type:
This will take a while. Agree to any prompts by typing or selecting "Yes".
I came back after 10-20 minutes and it was done. Then just reboot your jail... and everything should be working!!!!
I used the following post for guidance:
viewtopic.php?t=3503
Code: Select all
perl -MCPAN -eshell
Code: Select all
install MIME::Entity
This will take a while. Agree to any prompts by typing or selecting "Yes".
I came back after 10-20 minutes and it was done. Then just reboot your jail... and everything should be working!!!!
I used the following post for guidance:
viewtopic.php?t=3503
Re: Time Issue & Filters Not Deleting
Thanks for sharing! "filters not working problem" solved on my Debian by installing this moduleortelious wrote: ↑Mon Jul 15, 2019 2:00 pm Fixed it on ubuntu by:-Code: Select all
sudo apt install libnumber-bytes-human-perl
Re: Time Issue & Filters Not Deleting
hello,
i have a similar problem ZM filter stopped deleting events, the filter was working and pressing the "show matches" list opened empty.
From the event log /var/log/apache2/error.log
I look forward to your help
i have a similar problem ZM filter stopped deleting events, the filter was working and pressing the "show matches" list opened empty.
From the event log /var/log/apache2/error.log
System: Linux mint mate 20Mon Jan 11 10:42:24.523173 2021] [php7:notice] [pid 190154] [client 192.168.1.100:58238] PHP Notice: Undefined index: op in /usr/share/zoneminder/www/includes/functions.php on line 1294, referer: http: / /xxx.xxx.xx.xx/zm/index.php?view=filter&Id=6&action=&object=filter&filter%5BName%5D=Presse&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bobr%5D=0&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Battr%5D=StorageId&filter%5BQuery%5D%5Bterms%5D%5B1%5D%5Bop%5D=%3D&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bval%5D=1&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bcbr%5D=0&filter%5BQuery%5D%5Bterms%5D%5B1%5D%5Bcnj%5D=and&filter%5BQuery%5D%5Bterms%5D%5B1%5D%5Bobr%5D=0&filter%5BQuery%5D%5Bterms%5D%5B1%5D%5Battr%5D=Archived&filter%5BQuery%5D%5Bterms%5D%5B1%5D%5Bop%5D=%3D&filter%5BQuery%5D%5Bterms%5D%5B1%5D%5Bval%5D=0&filter%5BQuery%5D%5Bterms%5D%5B1%5D%5Bcbr%5D=0&filter%5BQuery%5D%5Bterms%5D%5B2%5D%5Bcnj%5D=and&filter%5BQuery%5D%5Bterms%5D%5B2%5D%5Bobr%5D=0&filter%5BQuery%5D%5Bterms%5D%5B2%5D%5Battr%5D=StartWeekday&filter%5BQuery%5D%5Bterms%5D%5B3%5D%5Bop%5D=%3D&filter%5BQuery%5D%5Bterms%5D%5B2%5D%5Bval%5D=0&filter%5BQuery%5D%5Bterms%5D%5B2%5D%5Bcbr%5D=0&filter%5BQuery%5D%5Bterms%5D%5B3%5D%5Bcnj%5D=and&filter%5BQuery%5D%5Bterms%5D%5B3%5D%5Bobr%5D=0&filter%5BQuery%5D%5Bterms%5D%5B3%5D%5Battr%5D=EndWeekday&filter%5BQuery%5D%5Bterms%5D%5B4%5D%5Bop%5D=%3D&filter%5BQuery%5D%5Bterms%5D%5B3%5D%5Bval%5D=4&filter%5BQuery%5D%5Bterms%5D%5B3%5D%5Bcbr%5D=0&filter%5BQuery%5D%5Bterms%5D%5B4%5D%5Bcnj%5D=and&filter%5BQuery%5D%5Bterms%5D%5B4%5D%5Bobr%5D=0&filter%5BQuery%5D%5Bterms%5D%5B4%5D%5Battr%5D=StartTime&filter%5BQuery%5D%5Bterms%5D%5B4%5D%5Bop%5D=%3E%3D&filter%5BQuery%5D%5Bterms%5D%5B4%5D%5Bval%5D=07%3A00%3A00&filter%5BQuery%5D%5Bterms%5D%5B4%5D%5Bcbr%5D=0&filter%5BQuery%5D%5Bterms%5D%5B5%5D%5Bcnj%5D=and&filter%5BQuery%5D%5Bterms%5D%5B5%5D%5Bobr%5D=0&filter%5BQuery%5D%5Bterms%5D%5B5%5D%5Battr%5D=EndTime&filter%5BQuery%5D%5Bterms%5D%5B5%5D%5Bop%5D=%3C%3D&filter%5BQuery%5D%5Bterms%5D%5B5%5D%5Bval%5D=19%3A00%3A00&filter%5BQuery%5D%5Bterms%5D%5B5%5D%5Bcbr%5D=0&filter%5BQuery%5D%5Bsort_field%5D=Name&filter%5BQuery%5D%5Bsort_asc%5D=1&filter%5BQuery%5D%5Blimit%5D=100&filter%5BUpdateDiskSpace%5D=1&filter%5BAutoExecuteCmd%5D=&filter%5BAutoDelete%5D=1&filter%5BAutoCopyTo%5D=&filter%5BAutoMoveTo%5D=&filter%5BBackground%5D=1
I look forward to your help
Re: Time Issue & Filters Not Deleting
Everything is fine, I deleted the filter and made a new one with the same parameters and everything works.
Thank you for your attention.
Thank you for your attention.