ZM on FreeBSD

Support and queries relating to third party Live CDs and DVD, VM images and other packaged distributions
dvl
Posts: 3
Joined: Thu Oct 14, 2021 8:23 pm

Re: ZM on FreeBSD

Post by dvl »

drnick999 wrote: Thu Oct 07, 2021 10:08 pm Thank you abi. I would of tried the patch you sent but I missed your reply until now. To my surprise someone updated the zoneminder truenas plugin to 1.36.5 and so far so good!
I just became aware of ZoneMinder, saw the above reply, and signed up to help with the FreeBSD port.

There are more than a few of us using ZM on FreeBSD (https://twitter.com/DLangille/status/14 ... 6058255362) and I know more will be coming.

I am a FreeBSD ports committer and hopefully I can help the team who did the recent update (https://www.freshports.org/multimedia/z ... r/#history).
--

Dan Langille
cookiemonster
Posts: 32
Joined: Sat Aug 15, 2015 1:46 pm

Re: ZM on FreeBSD

Post by cookiemonster »

Thanks to those efforts I've been able to "upgrade" ZM from 1.34 to 1.36.5. My installation is in a freebsd jail but my host was also in need to upgrade OS from freebsd 11.3. In the end I did create a new Boot Environment, made a new dataset and created a new jail on the new base and installed the package (not port) after installing a new 12.3 OS.
The pkg install was plain sailing. I did just finished getting the streaming working, finally ZM is up and running, There seems to be a slight but madenning change from 1.34 in the nginx config that was necessary.
Now I am for battling to get the motion detection with good results, right now it "works" but I have no events recorded at all with the old settings.
User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ZM on FreeBSD

Post by iconnor »

Start by setting all min blob, min area etc to like 1000. Use pixels not percent.

Also, you really want to get up to 1.36.12 if you can. Took me a while to stabilise ram use and thread locking.
cookiemonster
Posts: 32
Joined: Sat Aug 15, 2015 1:46 pm

Re: ZM on FreeBSD

Post by cookiemonster »

Ok it could very well be that instability on this architecture on 1.36.5. To get to latest 1.36.12 I would need to remove the packaged installation and build the port which landed 2 days ago. I'll give that a go. Thanks iconnor.
cookiemonster
Posts: 32
Joined: Sat Aug 15, 2015 1:46 pm

Re: ZM on FreeBSD

Post by cookiemonster »

I was finally able to complete the new jail and installing ZM from ports, and forcing pulling the latest which is 1.36.12. I had to build the dependencies from ports too as we can't (shouldn't) mix ports with packaged binaries. That is mysql, fastcgi, etc. Then set the cameras up and left them with default preset in the "all" zone just to see if it gets any detection and now that works.
Just one more thing mostly for future reference. I did add an fstab entry for procfs that I had forgotten it was set in my original jail. I entered also on the 1.36.5 too but didn't make a difference.
procfs /mnt/Raid5Disk/bastille/jails/zoneminder_new1/root/proc procfs rw 0 0
drnick999
Posts: 3
Joined: Thu May 20, 2021 6:30 pm

Re: ZM on FreeBSD

Post by drnick999 »

has anyone been successful in setting up the eventnotification server? I know i need to edit most of the paths in the install.sh and .ini confgs but still cant seem to get it to run.
CyberTiVo
Posts: 9
Joined: Thu Apr 25, 2013 2:12 pm

Re: ZM on FreeBSD

Post by CyberTiVo »

13.2 RELEASE using repo latest; pkg installed ZM 1.36.33; 5 monitors all showing video on the Montage screen; can Mocord on most cameras, one keeps giving me:
"Socket /var/run/zm/zms-805027s.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/lat ... window-etc for more information."

zms does manage to create some files in /var/run/zm:
-rw-r--r-- 1 www www 5B Jun 17 13:57 zm.pid
-rw-r--r-- 1 www www 5B Jun 17 13:58 zmaudit.pid
srwxr-xr-x 1 www www 0B Jun 17 13:57 zmdc.sock=
-rw------- 1 www www 0B Jun 17 13:50 zms-007176.lock
srwxr-xr-x 1 www www 0B Jun 17 13:50 zms-007176s.sock=
-rw------- 1 www www 0B Jun 17 13:51 zms-175936.lock
srwxr-xr-x 1 www www 0B Jun 17 13:51 zms-175936s.sock=
-rw------- 1 www www 0B Jun 17 14:06 zms-227290.lock
srwxr-xr-x 1 www www 0B Jun 17 14:06 zms-227290s.sock=
-rw------- 1 www www 0B Jun 17 13:57 zms-306778.lock
srwxr-xr-x 1 www www 0B Jun 17 13:57 zms-306778s.sock=
-rw------- 1 www www 0B Jun 17 13:54 zms-343496.lock
srwxr-xr-x 1 www www 0B Jun 17 13:54 zms-343496s.sock=
-rw------- 1 www www 0B Jun 17 13:56 zms-503670.lock
srwxr-xr-x 1 www www 0B Jun 17 13:56 zms-503670s.sock=
-rw------- 1 www www 0B Jun 17 13:49 zms-527772.lock
srwxr-xr-x 1 www www 0B Jun 17 13:52 zms-527772s.sock=
-rw------- 1 www www 0B Jun 17 13:54 zms-585329.lock
srwxr-xr-x 1 www www 0B Jun 17 13:56 zms-585329s.sock=
-rw------- 1 www www 0B Jun 17 13:50 zms-736816.lock
srwxr-xr-x 1 www www 0B Jun 17 13:50 zms-736816s.sock=

Additionally, zmninja shows only ? or ... on the monitor windows and if I try to use "Live View" I get this error in Nginx error.log:
[error] 922#100610: *4567 FastCGI sent in stderr: "PHP message: ERR [socket_sendto( /var/run/zm/zms-416142s.sock ) failed: Connection refused]" while reading response header from upstream, client: 172.18.0.154, server: , request: "GET /zm/index.php?view=request&request=stream&connkey=#########################&command=99 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "172.18.0.10", referrer: "http://172.18.0.10/zm/index.php?view=watch&mid=5"

all directories are chmod www:www; I have hundreds of GB of disk space; 8GB of memory; the 5 cameras are streaming 640x480
# ZoneMinder url path to the zms streaming server
ZM_PATH_ZMS=/cgi-bin/nph-zms
# ZM_PATH_ZMS=/cgi-bin/zms

I've spent hours trying to crack the code with no luck.
User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ZM on FreeBSD

Post by iconnor »

a browser will only connect to a server 6 times at once. The sixth camera breaks ZM. You will want to setup multi-port

viewtopic.php?t=31301
CyberTiVo
Posts: 9
Joined: Thu Apr 25, 2013 2:12 pm

Re: ZM on FreeBSD

Post by CyberTiVo »

I get that and will set that up, but my main problem is not with ZMNinjia and I only have 5 monitors
Post Reply