Re: ZM on FreeBSD
Posted: Sat Apr 09, 2016 9:44 am
I solved the mystery of 1 camera show! fcgiwrap spawns 1 children on default settings (the rc file mentions 4 workers - so I was confused until I looked into rc script deeply).
Code: Select all
'zmtelemetry.pl' exited abnormally, exit status 9
Probably, I didn't looked into it yet.knnniggett wrote:This likely means you are missing at least one Perl module. As always, execute the script from the command line (as root) to get more information.
Still image works. The crash is when I try to playback the recorded event. (Monitor's events -> click on event name).knnniggett wrote:Replay is a mode in ZoneMinder which can be one of: Single Event, Gapless Events, or All Events. However, from the context of your message this does not appear to be what you mean. Do you mean you are simply trying to play back a recorded event?
Code: Select all
abishai@freezm:~ % ls -la /var/run/zm
total 8
drwxr-xr-x 2 www www 512 Apr 9 21:44 .
drwxr-xr-x 7 root wheel 512 Apr 9 05:10 ..
srwxr-xr-x 1 www www 0 Apr 9 12:42 zms-316652s.soc
srwxr-xr-x 1 www www 0 Apr 9 12:45 zms-334113s.soc
srwxr-xr-x 1 www www 0 Apr 9 12:42 zms-342574s.soc
srwxr-xr-x 1 www www 0 Apr 9 12:49 zms-351807s.soc
srwxr-xr-x 1 www www 0 Apr 9 12:33 zms-504999s.soc
srwxr-xr-x 1 www www 0 Apr 9 12:45 zms-510731s.soc
srwxr-xr-x 1 www www 0 Apr 9 12:49 zms-578770s.soc
srwxr-xr-x 1 www www 0 Apr 9 12:49 zms-587422s.soc
srwxr-xr-x 1 www www 0 Apr 9 12:45 zms-708748s.soc
-rw------- 1 www www 0 Apr 9 12:45 zms-770387.lock
srwxr-xr-x 1 www www 0 Apr 9 12:45 zms-770387s.soc
-rw------- 1 www www 0 Apr 9 21:44 zms-872322.lock
srwxr-xr-x 1 www www 0 Apr 9 21:44 zms-872322s.soc
srwxr-xr-x 1 www www 0 Apr 9 12:49 zms-883746s.soc
-rw------- 1 www www 0 Apr 9 21:44 zms-903044.lock
srwxr-xr-x 1 www www 0 Apr 9 21:44 zms-903044s.soc
srwxr-xr-x 1 www www 0 Apr 9 12:49 zms-950772s.soc
srwxr-xr-x 1 www www 0 Apr 9 12:42 zms-987045s.soc
srwxr-xr-x 1 www www 0 Apr 9 12:49 zms-993348s.soc
Code: Select all
if(zm_sendfile(fileno(stdout), fileno(fdj), 0, (int)filestat.st_size) != (int)filestat.st_size) {
Code: Select all
#ifdef HAVE_SENDFILE4_SUPPORT
#include <sys/sendfile.h>
int zm_sendfile(int out_fd, int in_fd, off_t *offset, size_t size) {
int err;
err = sendfile(out_fd, in_fd, offset, size);
if (err < 0)
return -errno;
return err;
}
#elif HAVE_SENDFILE7_SUPPORT
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
int zm_sendfile(int out_fd, int in_fd, off_t *offset, off_t size) {
int err;
Debug(2, "Foo1");
err = sendfile(in_fd, out_fd, *offset, size, NULL, &size, 0);
Debug(2, "Foo2");
if (err && errno != EAGAIN)
return -errno;
if (size) {
*offset += size;
return size;
}
return -EAGAIN;
}
#else
#error "Your platform does not support sendfile. Sorry."
#endif
Code: Select all
04/17/16 15:47:46.678725 zms[100176].DB2-zm_sendfile.h/18 [Foo1]
04/17/16 15:47:46.678793 zms[100176].ERR-zm_signal.cpp/54 [Got signal 11 (Segmentation fault), crashing]
Code: Select all
04/17/16 18:45:41.346025 zms[100144].DB1-zm_stream.cpp/311 [We have obtained a lock on /var/run/zm/zms-284362.lock fd: 8]
04/17/16 18:45:41.346168 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 1]
04/17/16 18:45:41.601179 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 2]
04/17/16 18:45:41.931828 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 3]
04/17/16 18:45:42.307969 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 4]
04/17/16 18:45:42.684060 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 5]
04/17/16 18:45:43.040713 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 6]
04/17/16 18:45:43.429165 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 7]
04/17/16 18:45:43.740155 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 8]
04/17/16 18:45:44.174712 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 9]
04/17/16 18:45:44.498401 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 10]
04/17/16 18:45:44.842668 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 11]
04/17/16 18:45:45.234649 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 12]
04/17/16 18:45:45.529661 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 13]
04/17/16 18:45:45.886655 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 14]
04/17/16 18:45:46.230929 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 15]
04/17/16 18:45:46.587655 zms[100144].DB2-zm_event.cpp/1222 [Sending frame 16]
I read it. That patches was accepted by upsteam mostly. The issues ZM has now are not covered by that thread.achix wrote:Guys are you sure you have read this : viewtopic.php?f=9&t=23298 ?
I'm making one here - https://github.com/abishai/Zoneminder-portachix wrote:BTW, is there any official FreeBSD port made out of those patches?
abi wrote:I'm making one here - https://github.com/abishai/Zoneminder-portachix wrote:BTW, is there any official FreeBSD port made out of those patches?
It's almost ready, however, I'd like to solve at least one of minor issue - V4L support.
Code: Select all
uname -a
FreeBSD hik-free 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 03:51:29 UTC 2016 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386
Code: Select all
root@hik-free:/home/serg/Zoneminder-port-master # make install
===> Installing for zoneminder-1.29.1.a.20160426
===> zoneminder-1.29.1.a.20160426 depends on package: p5-DBI>=0 - found
===> zoneminder-1.29.1.a.20160426 depends on package: p5-DBD-mysql>=0 - found
===> zoneminder-1.29.1.a.20160426 depends on package: p5-Date-Manip>=0 - found
===> zoneminder-1.29.1.a.20160426 depends on package: p5-Test-LWP-UserAgent>=0 - found
===> zoneminder-1.29.1.a.20160426 depends on package: p5-Sys-Mmap>=0 - found
===> zoneminder-1.29.1.a.20160426 depends on package: p5-LWP-Protocol-https>=0 - found
===> zoneminder-1.29.1.a.20160426 depends on package: p5-Sys-CPU>=0 - found
===> zoneminder-1.29.1.a.20160426 depends on package: p5-Sys-MemInfo>=0 - found
===> zoneminder-1.29.1.a.20160426 depends on executable: ffmpeg - found
===> zoneminder-1.29.1.a.20160426 depends on executable: sudo - found
===> zoneminder-1.29.1.a.20160426 depends on executable: zip - found
===> zoneminder-1.29.1.a.20160426 depends on package: perl5>=5.20<5.21 - found
===> zoneminder-1.29.1.a.20160426 depends on shared library: libjpeg.so - found (/usr/local/lib/libjpeg.so)
===> zoneminder-1.29.1.a.20160426 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so)
===> zoneminder-1.29.1.a.20160426 depends on shared library: libmysqlclient.so.18 - found (/usr/local/lib/mysql/libmysqlclient.so.18)
===> Checking if zoneminder already installed
===> Registering installation for zoneminder-1.29.1.a.20160426
pkg-static: Unable to access file /usr/home/serg/Zoneminder-port-master/work/stage/usr/local/lib/perl5/site_perl/man/man3/ONVIF::Media::Elements::GetCompatibleVideoSou: No such file or directory
pkg-static: duplicate file listing: /usr/local/lib/perl5/site_perl/mach/5.20/auto/ZoneMinder/.packlist, ignoring
pkg-static: duplicate file listing: /usr/local/lib/perl5/site_perl/mach/5.20/auto/ONVIF/.packlist, ignoring
*** Error code 74
Stop.
make[1]: stopped in /usr/home/serg/Zoneminder-port-master
*** Error code 1
Stop.
make: stopped in /usr/home/serg/Zoneminder-port-master
Code: Select all
root@freebsd-1:~ # mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Code: Select all
mysql -u root -p zm < /usr/local/share/zoneminder/db/zm_create.sql
Code: Select all
root@freebsd-1:~ # find / -name zm_create.sql
/usr/local/share/doc/zoneminder/zm_create.sql
This is wrong. pkg != ports.melloa wrote:so used pkg to install it from ports