Time Issue & Filters Not Deleting

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
n8klayko
Posts: 32
Joined: Tue Apr 17, 2018 7:54 pm

Time Issue & Filters Not Deleting

Post by n8klayko » Tue Mar 19, 2019 5:25 am

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?
Capture.PNG
Capture.PNG (492.23 KiB) Viewed 5941 times

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.

andrew-yu
Posts: 16
Joined: Thu Sep 20, 2018 7:50 am

Re: Time Issue & Filters Not Deleting

Post by andrew-yu » 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

n8klayko
Posts: 32
Joined: Tue Apr 17, 2018 7:54 pm

Re: Time Issue & Filters Not Deleting

Post by n8klayko » Tue Mar 19, 2019 5:50 pm

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
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.
Capture.PNG
Capture.PNG (53.35 KiB) Viewed 5920 times
I am thinking that there must be another variable or a different way to change this that won't break MySQL or ZM.

n8klayko
Posts: 32
Joined: Tue Apr 17, 2018 7:54 pm

Re: Time Issue & Filters Not Deleting

Post by n8klayko » Tue Mar 19, 2019 7:15 pm

Regarding the issue with the ZMFilter. Please see the reference error log lines below:
Capture.PNG
Capture.PNG (6.87 KiB) Viewed 5920 times

Also, notice that the time is also off in this error log as well. I am thinking that these could be linking issues.

n8klayko
Posts: 32
Joined: Tue Apr 17, 2018 7:54 pm

Re: Time Issue & Filters Not Deleting

Post by n8klayko » Tue Mar 19, 2019 7:43 pm

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.

n8klayko
Posts: 32
Joined: Tue Apr 17, 2018 7:54 pm

Re: Time Issue & Filters Not Deleting

Post by n8klayko » Fri Mar 22, 2019 2:41 pm

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?

siconic
Posts: 8
Joined: Mon Jan 07, 2019 3:21 pm

Re: Time Issue & Filters Not Deleting

Post by siconic » Thu Apr 11, 2019 1:00 pm

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.

n8klayko
Posts: 32
Joined: Tue Apr 17, 2018 7:54 pm

Re: Time Issue & Filters Not Deleting

Post by n8klayko » Tue Jul 02, 2019 6:20 pm

I'm still having this issue with the plugin. Anyone have any fix ideas?

icono2
Posts: 3
Joined: Wed Jun 05, 2019 4:38 am

Re: Time Issue & Filters Not Deleting

Post by icono2 » Thu Jul 11, 2019 12:13 am

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!

ortelious
Posts: 1
Joined: Mon Jul 15, 2019 1:51 pm

Re: Time Issue & Filters Not Deleting

Post by ortelious » Mon Jul 15, 2019 2:00 pm

n8klayko wrote:
Tue Mar 19, 2019 7:15 pm
Regarding the issue with the ZMFilter. Please see the reference error log lines below:
Capture.PNG


Also, notice that the time is also off in this error log as well. I am thinking that these could be linking issues.
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:
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.
Fixed it on ubuntu by:-

Code: Select all

sudo apt install libnumber-bytes-human-perl

icono2
Posts: 3
Joined: Wed Jun 05, 2019 4:38 am

Re: Time Issue & Filters Not Deleting

Post by icono2 » Thu Jul 18, 2019 12:30 am

Ortelious, thank you, your answer fixed it immediately.

n8klayko
Posts: 32
Joined: Tue Apr 17, 2018 7:54 pm

Re: Time Issue & Filters Not Deleting

Post by n8klayko » Thu Aug 29, 2019 6:14 pm

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:

Code: Select all

perl -MCPAN -eshell
Accept the defaults and don't install any new bundles for now. Then once the initial config is over just type:

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

pms
Posts: 9
Joined: Sat Aug 24, 2019 3:59 pm
Contact:

Re: Time Issue & Filters Not Deleting

Post by pms » Tue Sep 17, 2019 2:06 pm

ortelious wrote:
Mon Jul 15, 2019 2:00 pm
Fixed it on ubuntu by:-

Code: Select all

sudo apt install libnumber-bytes-human-perl
Thanks for sharing! "filters not working problem" solved on my Debian by installing this module

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests