Zoneminder on FreeNAS

Status
Not open for further replies.

avguy4612

Cadet
Joined
Jul 6, 2016
Messages
2
What are our options now if we upgrade to Freenas 10? Is there a docker container for Zone Minder?
 

Davos

Cadet
Joined
Jan 16, 2017
Messages
3
Version 1.01 - Added pkg install option.

Hi,

After receiving lots of permission deny errors on the fcgiwrap.sock file in the /var/run/fcgiwrap/ location in /var/log/nginx/error.log, I figured out that the permission and group on this file were being set incorrectly on start-up for the 'fcgiwrap' service. This was preventing live video streams being displayed even though the camera was capturing ok.

To fix these errors you need to add the following 2 lines to /etc/rc.conf

fcgiwrap_socket_group="www"
fcgiwrap_socket_mode="0775"


Were showing after service restart:

srwxr-xr-x 1 root wheel 0 Jan 16 09:51 fcgiwrap.sock

Should be:

srwxrwxr-x 1 root www 0 Jan 16 09:51 fcgiwrap.sock


Then restart the jail ... please update the document, and thanks for a great instruction :D
 

Davos

Cadet
Joined
Jan 16, 2017
Messages
3
Thanks for the guide, I have successful installed zoneminder in freenas jail. but i bumped into a problem. (videos not streaming)
getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-631180s.sock ) failed: No such file or directory - checkStreamForErrors()

I have tried to solve the problem in Ubuntu and Apache by changing zm path and enable CGI.
but i have no idea how to solve the problem with freebsd and nginx. tried to google for some hints but have yet to found a solution.
Helps will be much appreciated

Hi There,

I was getting these errors.... please add the following details below:


To fix these errors you need to add the following 2 lines to /etc/rc.conf

fcgiwrap_socket_group="www"
fcgiwrap_socket_mode="0775"
 

Davos

Cadet
Joined
Jan 16, 2017
Messages
3
Hi There,

I was getting these errors.... please add the following details below:


To fix these errors you need to add the following 2 lines to /etc/rc.conf

fcgiwrap_socket_group="www"
fcgiwrap_socket_mode="0775"

To add you may need to restart fcgiwrap / php / nginx and zoneminder services after adding these changes.
 

bax5000

Dabbler
Joined
Jul 15, 2012
Messages
40
Hi and sorry for my english ;) !

I installed ZM as dicribed in the pdf on my freeNAS.
I installed with "pkg install.........."

Every step was a success - only the last command "service zoneminder start" won't work.
I get this:
Code:
zoneminder does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d)


Every single command before this one was successfull.

Whats going on here?

Thanks for any help!!
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
See if your /etc/rc.conf has it enabled.

It should have a line like:

zoneminder_enable="YES"
 

bax5000

Dabbler
Joined
Jul 15, 2012
Messages
40
Yes, it's activated - like in you'r pdf. please check the picture.

Now i see another problem.

The command "mysql -u root -p zm < /usr/local/share/zoneminder/db/zm_create.sql"
results in:

Code:
root@ZM:/usr/home/hera # mysql -u root -p zm < /usr/local/share/zoneminder/db/zm_create.sql
/usr/local/share/zoneminder/db/zm_create.sql: No such file or directory.
root@ZM:/usr/home/hera #


Any idea?
screen.PNG
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
No ideas. Just did a fresh FreeBSD install and followed all steps in the pdf:

Code:
root@freebds:/usr/local/etc/nginx # mysql -u root -p zm < /usr/local/share/zoneminder/db/zm_create.sql
Enter password:
root@freebds:/usr/local/etc/nginx # service zoneminder start
root@freebds:/usr/local/etc/nginx # service zoneminder status
running


upload_2017-1-18_14-45-2.png
 

bax5000

Dabbler
Joined
Jul 15, 2012
Messages
40
WTF????? Sorry.........

i try it again tomorrow if my test with Ubuntu in a freeNAS-Jail won't work.....
Thanks for testing!!

Tomorrow i will report every step...
 

bax5000

Dabbler
Joined
Jul 15, 2012
Messages
40
I did it with iohyve and installed Ubuntu 16.04 LTS with Zoneminder.
Running very good!
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
I did it with iohyve and installed Ubuntu 16.04 LTS with Zoneminder.
Running very good!

Glad is running. So you've installed on an ubuntu using the ubuntu zm repo, right? Just to clarify.
 

Fabbat

Dabbler
Joined
Oct 24, 2013
Messages
46
I tried
To add you may need to restart fcgiwrap / php / nginx and zoneminder services after adding these changes.

Thank you for your suggestion. I followed your instructions and I partially fixed my problem. Before add your lines to rc.conf I didn't see anything about video stream and I have a list of error on log. Now th eerrors are disappears, I have a streaming video, but I just see only a blue screen with a time stamp on top left corner. Is there something that I missed? Thank you
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I tried

Thank you for your suggestion. I followed your instructions and I partially fixed my problem. Before add your lines to rc.conf I didn't see anything about video stream and I have a list of error on log. Now th eerrors are disappears, I have a streaming video, but I just see only a blue screen with a time stamp on top left corner. Is there something that I missed? Thank you
What was is the problem you were having? Did the video streams work before?
 

Fabbat

Dabbler
Joined
Oct 24, 2013
Messages
46
What was is the problem you were having? Did the video streams work before?
I've fixed. I had a blue screen instead of video streaming. But now I corrected the resolution of camera and it works great now. Thank you for your support.
Do you know if is it possible to use a USB camera connected to the freenas Box within zoneminder?
Thank you again.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
glad its working.

i dont think it would be possible to get a usb camera working. but if you want to try i think this is what you'd need to do...
* make sure freenas kernel is recognizing/assigning a driver for the USB camera
* make sure freenas is passing the device to your jail
* compile zoneminder port with V4L support
 

Fabbat

Dabbler
Joined
Oct 24, 2013
Messages
46
Thank you so much for your answer.
Mmmm it seems very complicated, maybe too much for my skills, I think I change my mind about it.

Sorry, just an additional question.
I saw here that it is possible to create a script to control also the PTZ capabilities of IP Cam.
Do you know where I have to put that perl script in freeBSD version of zoneminder directories?
Thank you
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949

Martin Bauer

Dabbler
Joined
Nov 13, 2013
Messages
26
Hello all,
I am having the same problem as many - images are being saved but there is no image showing in the web interface when clicking on a particular camera. Here is what I have done so far ( also have done the install several times in different jails in FreeNAS - I've tried different methods of resolution from other posts too )

I am still getting a broken image placeholder when I click on the camera monitor under ZoneMinder. arghhh - I am frustrated because I am sure this is something simple -

Here is what I am trying to do exactly:

Run ZoneMinder on Freenas

system: Build FreeNAS-9.10.2-U1 (86c7ef5)
Platform Intel(R) Xeon(R) CPU 5110 @ 1.60GHz
Memory 8161MB
Load Average 0.88, 0.76, 0.69

  1. I built the jail from the FN console - nothing special /
  2. I did NOT add Storage using the FN Jail Gui as others have suggested here ( post 194 from joshua Parker Ruehlig on 7/2/2016)
  3. I followed the pkg install instructions to the letter from here:
  4. Zoneminder 1.30 FreeBSD Installation and configuration - (links to a PDF on google drive)
    Version: 1.02 dated 6/23/2016 ( * thanks Melloa * )
  5. I did NOT modify FSTAB as recommended on page 12 of Melloa's Doc. - FSTAB / tmpfs /tmp tmpfs rw,nosuid,mode=01777 0 0 ( becasue fstab was empty )
  6. I did correct the path as recommended by other posts - ZM web Gui / Options / Paths - PATH_ZMS = /zm/cgi-bin/nph-zms

The Good News
  • ZM is up and running ( just like the first build ) - I have the web front end and can add CAMS
  • The Cams work in ZM - capturing / motion detection / etc
  • I can save images on an alert as is designed - I can download them in a zip file

The Bad News
  • When clicking on a Cam I still get a broken image placeholder and the error log shows :
  • getCmdResponse stream error: Socket /var/run/zm/zms-898367s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en...-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors()
Somewhere someone said something about CGI not working correctly - a path issue ?

Any help would be appreciated - I am also going to post this information in the ZoneMinder forums in the event the fix is related to a configuration or setting particular to the Camera I am using: an SV3C POE Cam with varifocal lens

- https://www.amazon.com/dp/B01N2R5THA/ref=cm_sw_r_cp_dp_T1_dorszbE6EGND8
 
Status
Not open for further replies.
Top