freenas / iocage-ix-plugins

Official iXSystems iocage plugins for FreeNAS and TrueOS
175 stars 109 forks source link

Zoneminder Plugin Issues #77

Closed n8klayko closed 5 years ago

n8klayko commented 5 years ago

I have found several issues with the FreeNAS Zoneminder plugin. I created a topic about this on the zoneminder forum, but I am posting this here as well. https://forums.zoneminder.com/viewtopic.php?f=38&t=28161

The first issue was related to the time showing incorrectly in the logs files. This was remedied by changing the timezone in "/iocage/jails/zoneminder/root/usr/local/etc/php.ini". I would think that this should be changed in the plugin itself so that the time pulls from FreeNAS or MySQL.

The second issue I am still working on. This issue is with the filters not working in the 1.32.3 plugin for FreeNAS 11.2 U2.1. Please see the image below for the error I am getting from my logs. I have not found a fix for this yet, but need to find one soon. Any help would be appreciated! Capture

n8klayko commented 5 years ago

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?

miwi-fbsd commented 5 years ago

Hi @n8klayko,

Thanks for your report, I will look in to it within this week.

miwi-fbsd commented 5 years ago

@n8klayko for the first problem, PHP needs a datetime to get it to work, when we build the script we decided to keep it UTC, we should document that so users now what to change.

for the sec problem. I tested zoneminder on Linux and it seems to have the same issue.

n8klayko commented 5 years ago

@n8klayko for the first problem, PHP needs a datetime to get it to work, when we build the script we decided to keep it UTC, we should document that so users now what to change.

for the sec problem. I tested zoneminder on Linux and it seems to have the same issue.

Thanks for looking into this! I did actually figure out the PHP/time issue and posted that on the zoneminder forum (linked above), but I am not sure how to resolve the filter issue.

That is interesting that it is also not working properly on linux either. Do have any thoughts on how to resolve this issue? I may post back over on the ZM forums to see if anyone else has a fix. I have looked all over, but have not seen others with this same issue... which is kinda odd if it is also happening on other OS's.

n8klayko commented 5 years ago

Hello, I am still having an issue with the filters not working in the 1.32.3 plugin for FreeNAS-11.2-U5. Filters are not working to auto delete events/files and the size of the events on the disk are also not showing up until I open each event. I have not found a fix for this yet, but need to find one soon. Any help would be appreciated!

I have also been trying to get the APIs working for ZMNinja and have had the the folks from pliable pixels take a look at the plugin and confirm that there is some issue with the APIs working correctly. I really need a fix for these issues.

drinking12many commented 5 years ago

As n8klayko said there is definitely some problem with the API, I took a look around and even on a fresh install the API is broke. zoneminderapi going to http://zoneminder/zm/api/host/getversion.json zoneminderapi2

Zoneminder itself seems to be mostly working otherwise.

drinking12many commented 5 years ago

Ok I think I found it looks like when the jail is created there is not a /var/log/zm which the api uses I created it and set the perms to 770 (probably could be better) but it worked after a restart.

n8klayko commented 5 years ago

Hey guys, sorry I forgot to post my fix for this over here... I posted it on the zoneminder forums though. Here is the full forum post if you want to track what I did to resolve the problems I encountered:

https://forums.zoneminder.com/viewtopic.php?f=38&t=28161&p=111714#p111714

Here was my fix for the filters and API stuff:

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:

perl -MCPAN -eshell

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

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!!!!