Page 1 of 2
Not Streaming on monitor
Posted: Mon Nov 30, 2015 1:19 am
by vmos
Hi !
recently i installed ZM in an Debian 8 distro amd64 after of some problems setting up the installation with the database i be able of run the service and get to the web UI i have a usb camera
Driver: uvcvideo
Card: FaceCam 1000X
but when i tried to check the monitor i just cant
the logs say
Code: Select all
getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-631180s.sock ) failed: No such file or directory - checkStreamForErrors()
socket_sendto( /var/run/zm/zms-631180s.sock ) failed: No such file or directory
'zmc -d /dev/video0' exited abnormally, exit status 255
Captured image dimensions differ: V4L2: 352x288 monitor: 384x288
Starting Capture version 1.28.109
No direct match for the selected palette (
Selected capture palette: YUV 4:2:2 (YUYV) (YUYV)
'zmc -d /dev/video0' starting at 15/11/29 19:07:12, pid = 7262
Starting pending process, zmc -d /dev/video0
looking in many webs some users says that the solution is enable the cgi in Apache something that i already tried with no luck, this is mi zm apache.conf
Code: Select all
Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www>
php_flag register_globals off
Options Indexes FollowSymLinks
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
</Directory>
also i try to add the ScripAlias and not work to
i really will appreciate your help because im head banning with this issue
Regards
Re: Not Streaming on monitor
Posted: Mon Nov 30, 2015 1:38 am
by bbunge
Check out:
https://wiki.zoneminder.com/Debian_8.1_ ... e_Easy_Way
Bet you need to:
Click Paths
Change PATH_ZMS from /cgi-bin/nph-zms to /zm/cgi-bin/nph-zms Click Save
Optional: under Paths change PATH_SWAP to /dev/shm (puts this process in RAM drive) Click Save
Restart Zoneminder
Re: Not Streaming on monitor
Posted: Mon Nov 30, 2015 2:15 am
by vmos
No luck with that
i going to try purge all and make a new install with the tutorial of the wiki and i will come back with the feedback
Thanks
Re: Not Streaming on monitor
Posted: Mon Nov 30, 2015 6:17 pm
by knight-of-ni
This is the first thing I would look at it. Looks like zoneminder is telling you what the problem is:
Captured image dimensions differ: V4L2: 352x288 monitor: 384x288
It says the incoming stream has dimensions of 352x288, but you've entered 384x288 into the monitor configuration.
You have get the resolution correct, exactly, in order for the camera to work in zoneminder.
Re: Not Streaming on monitor
Posted: Tue Dec 01, 2015 4:17 pm
by vmos
Thanks for the advice!
i change the image dimensions and that error disappear from the logs but still have no image and the same errors is good to see that the camera is now capturing and seems to appear that the unique problem left is the streaming of the video
Code: Select all
ERR getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-714635s.sock ) failed: No such file or directory - checkStreamForErrors()
ERR socket_sendto( /var/run/zm/zms-714635s.sock ) failed: No such file or directory
INF Monitor-1: 6000 - Capturing at 30.30 fps
Right now im clean install in a virtual machine with the wiki guide
Hope find the solution to this issue
regards
Re: Not Streaming on monitor
Posted: Tue Dec 01, 2015 4:25 pm
by knight-of-ni
If your backend is working and you get socket_sendto errors, that almost always means you have an Apache configuration issue, most likely a problem with your ScriptAlias. The ScriptAlias has to agree with what is in PATH_ZMS under options. I can't really get more specific than that because I don't use Debian. bbunge might be able to help further.
Re: Not Streaming on monitor
Posted: Wed Dec 02, 2015 4:36 am
by vmos
Im losing the hope
here is what i got
first i have mi physical installation of zone minder in my server with Debian 8 amd64 also i have a samba and phpvirtualbox service running in the same PC
i installed zone minder following this guide
http://terminal28.com/how-to-install-an ... -8-jessie/
i have some problems with the database setup and starting the service but i solved thats issue, after that when i finally get the web UI works i found that the monitor is no streaming video, so checking the logs i found many issues and begin to read post in many website and trying different solutions until i reduce the error in the logs to just two
Code: Select all
2015-12-01 22:13:04.799905 web_php 1259 ERR socket_sendto( /var/run/zm/zms-692113s.sock ) failed: No such file or directory /usr/share/zoneminder/www/includes/functions.php 2347
2015-12-01 22:12:52.797307 web_js 1261 ERR getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-692113s.sock ) failed: No such file or directory - checkStreamForErrors() ?view=watch
2015-12-01 22:12:52.732303 web_php 1261 ERR socket_sendto( /var/run/zm/zms-692113s.sock ) failed: No such file or directory /usr/share/zoneminder/www/includes/functions.php 2347
2015-12-01 22:12:40.729476 web_js 1261 ERR getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-692113s.sock ) failed: No such file or directory - checkStreamForErrors() ?view=watch
2015-12-01 22:12:40.668203 web_php 1261 ERR socket_sendto( /var/run/zm/zms-692113s.sock ) failed: No such file or directory /usr/share/zoneminder/www/includes/functions.php 2347
2015-12-01 22:11:59.778399 zmc_dvideo0 1975 INF Monitor-1: 19000 - Capturing at 6.58 fps zm_monitor.cpp 3160
2015-12-01 22:09:27.699425 zmc_dvideo0 1975 INF Monitor-1: 18000 - Capturing at 30.30 fps zm_monitor.cpp 3160
2015-12-01 22:08:54.275660 zmc_dvideo0 1975 INF Monitor-1: 17000 - Capturing at 29.41 fps zm_monitor.cpp 3160
2015-12-01 22:08:20.855887 zmc_dvideo0 1975 INF Monitor-1: 16000 - Capturing at 30.30 fps zm_monitor.cpp 3160
2015-12-01 22:07:47.432122 zmc_dvideo0 1975 INF Monitor-1: 15000 - Capturing at 30.30 fps zm_monitor.cpp 3160
2015-12-01 22:07:14.012354 zmc_dvideo0 1975 INF Monitor-1: 14000 - Capturing at 29.41 fps zm_monitor.cpp 3160
2015-12-01 22:06:40.568584 zmc_dvideo0 1975 INF Monitor-1: 13000 - Capturing at 6.49 fps zm_monitor.cpp 3160
2015-12-01 22:04:06.249666 zmc_dvideo0 1975 INF Monitor-1: 12000 - Capturing at 6.25 fps zm_monitor.cpp 3160
2015-12-01 22:01:26.102755 zmc_dvideo0 1975 INF Monitor-1: 11000 - Capturing at 6.21 fps zm_monitor.cpp 3160
2015-12-01 21:58:45.951871 zmc_dvideo0 1975 INF Monitor-1: 10000 - Capturing at 6.25 fps zm_monitor.cpp 3160
2015-12-01 21:56:05.804970 zmc_dvideo0 1975 INF Monitor-1: 9000 - Capturing at 6.25 fps
is seems to appear that the camera is working and is capturing but when i click in the monitor for see the video then the error shows in logs and of course i cant see no video
this is my conf file
Code: Select all
Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www>
php_flag register_globals off
Options Indexes FollowSymLinks
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
</Directory>
i already try add the ScripAlias and i dont have luck with that
this are the permission of the /usr/share/zoneminder/www
Code: Select all
drwxr-xr-x 2 root root 4096 nov 29 14:26 ajax
-rw-r--r-- 1 root root 46494 mar 13 2011 cambozola.jar
lrwxrwxrwx 1 root root 17 nov 29 14:24 cgi-bin -> ../../lib/cgi-bin
drwxr-xr-x 2 root root 4096 nov 29 14:26 css
drwxr-xr-x 2 root root 12288 nov 29 14:26 db
lrwxrwxrwx 1 root root 28 nov 29 14:24 events -> /var/cache/zoneminder/events
drwxr-xr-x 2 root root 4096 nov 29 14:26 graphics
lrwxrwxrwx 1 root root 28 nov 29 14:24 images -> /var/cache/zoneminder/images
drwxr-xr-x 2 root root 4096 nov 29 14:26 includes
-rw-r--r-- 1 root root 6346 nov 29 14:24 index.php
drwxr-xr-x 2 root root 4096 nov 29 14:26 js
drwxr-xr-x 2 root root 4096 nov 29 14:26 lang
drwxr-xr-x 5 root root 4096 nov 29 14:26 skins
lrwxrwxrwx 1 root root 26 nov 29 14:24 temp -> /var/cache/zoneminder/temp
drwxr-xr-x 3 root root 4096 nov 29 14:26 tools
drwxr-xr-x 2 root root 4096 nov 29 14:26 views
the /tmp/zm directory is empty and no socket file create in that directory
in the apache logs file i found something more specific but i not sure what it means
Code: Select all
[Tue Dec 01 21:33:05.488379 2015] [core:error] [pid 2048] [client 192.168.254.4:35659] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/zoneminder/www/cgi-bin, referer: http://192.168.254.2/zm/?view=watch&mid=1
[Tue Dec 01 21:33:05.581295 2015] [core:error] [pid 2048] [client 192.168.254.4:35659] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/zoneminder/www/cgi-bin, referer: http://192.168.254.2/zm/?view=watch&mid=1
[Tue Dec 01 21:33:11.117651 2015] [:error] [pid 2048] [client 192.168.254.4:35659] ERR [socket_sendto( /var/run/zm/zms-387995s.sock ) failed: No such file or directory], referer: http://192.168.254.2/zm/?view=watch&mid=1
[Tue Dec 01 21:33:23.188654 2015] [:error] [pid 2049] [client 192.168.254.4:35661] ERR [socket_sendto( /var/run/zm/zms-387995s.sock ) failed: No such file or directory], referer: http://192.168.254.2/zm/?view=watch&mid=1
[Tue Dec 01 21:33:35.249773 2015] [:error] [pid 2049] [client 192.168.254.4:35661] ERR [socket_sendto( /var/run/zm/zms-387995s.sock ) failed: No such file or directory], referer: http://192.168.254.2/zm/?view=watch&mid=1
[Tue Dec 01 21:33:47.308982 2015] [:error] [pid 2049] [client 192.168.254.4:35661] ERR [socket_sendto( /var/run/zm/zms-387995s.sock ) failed: No such file or directory], referer: http://192.168.254.2/zm/?view=watch&mid=1
[Tue Dec 01 21:33:59.379712 2015] [:error] [pid 1261] [client 192.168.254.4:35665] ERR [socket_sendto( /var/run/zm/zms-387995s.sock ) failed: No such file or directory], referer: http://192.168.254.2/zm/?view=watch&mid=1
[Tue Dec 01 21:53:50.323947 2015] [core:error] [pid 1258] [client 192.168.254.4:36448] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/zoneminder/www/cgi-bin, referer: http://192.168.254.2/zm/index.php?$
[Tue Dec 01 21:53:50.414097 2015] [core:error] [pid 1258] [client 192.168.254.4:36448] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/zoneminder/www/cgi-bin, referer: http://192.168.254.2/zm/index.php?$
[Tue Dec 01 21:53:53.663434 2015] [:error] [pid 1258] [client 192.168.254.4:36448] ERR [socket_sendto( /var/run/zm/zms-312867s.sock ) failed: No such file or directory], referer: http://192.168.254.2/zm/index.php?view=watch&mid=1
i can see that apache is refusing the symbolic link, but i dont know why, the file cgi-bin exist in the mention directory but if i opened with nano i have only a empty file
i feel in a dead end with this, also i try a clean install in a virtual machine using the guide from the wiki and the result is almost the same, the INF messages of the logs are differents but i cant see the video streaming and i get the same errors in the logs
hope someone can help me
Regards
Re: Not Streaming on monitor
Posted: Wed Dec 02, 2015 12:56 pm
by knight-of-ni
This is an Apache configuration problem. You should be looking at the Apache documentation for answers. Just Google the error message and it will take you right to how to fix it. Hint: You are likely missing a "+FollowSymLinks" under your ScriptAlias directive.
Re: Not Streaming on monitor
Posted: Wed Dec 02, 2015 6:48 pm
by liderbug
I just solve the same??? problem by copying (zm)/cgi-bin/nph-zms & zms to /var/www/cgi-bin/zm/. I was detecting, recording, could view the event jpg's external to ZM - just no streaming. I found it by editing /etc/php.ini and setting [ display_errors = On ] around line 469. then checking /var/log/httpd/error_log for
script not found or unable to stat: /var/www/cgi-bin/zm
Doing it that way is not correct - but it worked for me.
Re: Not Streaming on monitor
Posted: Thu Dec 03, 2015 1:25 am
by vmos
i activate the display_errrors = On in
and in
however i no see any logs, in my system i have
but i not see any php error also i check in the syslog and there is only the error that i mention before
the path /var/www/cgi-bin/zm/ not exist in my system all the files are in /usr/share/zoneminder/www and in this same directory is the file cgi-bin is a file not a directory, if i open this file with a text editor is empty, so i dont know if this suppose to be empty
the files nph-zms where i cant find it? i just have the one from the source but i dont know is this are ok and i dont know where i should put it
Realy thanks for the help!
Regards
Re: Not Streaming on monitor
Posted: Thu Dec 03, 2015 2:26 am
by liderbug
/usr/libexec/zoneminder/cgi-bin/nph-zms
/usr/libexec/zoneminder/cgi-bin/zms
I copied to /var/www/cgi-bin/zm/ (mkdir zm)
Errors will be in /var/log/httpd/error_log (at least on my Fedora system) Deb...???
This may fix your problem, may not.
Re: Not Streaming on monitor
Posted: Thu Dec 03, 2015 5:27 am
by vmos
Thanks i use a debian system but i be able of solved the problem of the symlink but unfortunately i have no video yet, the Symlink was broken so i delete and create it again, now this is what i have in logs
zoneminder logs
Code: Select all
Dec 2 22:59:34 V-Server zmc_dvideo0[12718]: INF [Monitor-1: 5000 - Capturing at 6.25 fps]
Dec 2 23:01:16 V-Server zmaudit[12721]: INF [Database monitor '1' does not exist in filesystem]
Dec 2 23:02:14 V-Server zmc_dvideo0[12718]: INF [Monitor-1: 6000 - Capturing at 6.25 fps]
Dec 2 23:02:59 V-Server web_php[12787]: ERR [socket_bind( /var/run/zm/zms-781671w.sock ) failed: No such file or directory - checkStreamForErrors()]
Dec 2 23:02:59 V-Server web_php[12787]: ERR [getStreamCmdResponse stream error: socket_bind( /var/run/zm/zms-781671w.sock )failed: No such file or directory - checkStreamForErrors()]
Dec 2 23:03:09 V-Server web_php[12787]: ERR [socket_bind( /var/run/zm/zms-781671w.sock )
so still get the problem, i tried to change the owner of the directory /var/run/zm and i get the same error but instead of failed: No such file or directory i got permission denied, so i guest the permissions is ok
in the dir /var/run/zm ther are two files zmdc.sock and zm.pid the first one is empty and the second one have a number i think should be a reference to a process running, i tried to create the file zms-781671w.sock but the error changes to failed: Protocol wrong type for socket - checkStreamForErrors()]
the log of apache says
Code: Select all
[Wed Dec 02 23:17:27.085588 2015] [:error] [pid 12788] [client 192.168.254.106:43167] ERR [socket_sendto( /var/run/zm/zms-722182s.sock ) failed: No such file or directory], referer: http://192.168.254.2/zm/index.php?view=watch&mid=1
[Wed Dec 02 23:17:39.155984 2015] [:error] [pid 12788] [client 192.168.254.106:43167] ERR [socket_sendto( /var/run/zm/zms-722182s.sock ) failed: No such file or directory], referer: http://192.168.254.2/zm/index.php?view=watch&mid=1
[Wed Dec 02 23:17:51.270654 2015] [:error] [pid 12786] [client 192.168.254.106:43170] ERR [socket_sendto( /var/run/zm/zms-722182s.sock ) failed: No such file or directory], referer: http://192.168.254.2/zm/index.php?view=watch&mid=1
[Wed Dec 02 23:18:03.340895 2015] [:error] [pid 12786] [client 192.168.254.106:43170] ERR [socket_sendto( /var/run/zm/zms-722182s.sock ) failed: No such file or directory], referer: http://192.168.254.2/zm/index.php?view=watch&mid=1
[Wed Dec 02 23:18:15.424863 2015] [:error] [pid 12666] [client 192.168.254.106:43173] ERR [socket_sendto( /var/run/zm/zms-722182s.sock ) failed: No such file or directory], referer: http://192.168.254.2/zm/index.php?view=watch&mid=1
so the unique error is this last one and it seems like for some reason zoneminder are not creating the sockets files into that directory in the logs also refers to a php file in /usr/share/zoneminder/www/include/functions.php i look to this file and i found this function i think that this is the one to pull the stream
Code: Select all
function getStreamSrc( $args, $querySep='&' )
{
$streamSrc = ZM_BASE_URL.ZM_PATH_ZMS;
if ( ZM_OPT_USE_AUTH )
{
if ( ZM_AUTH_RELAY == "hashed" )
{
$args[] = "auth=".generateAuthHash( ZM_AUTH_HASH_IPS );
}
elseif ( ZM_AUTH_RELAY == "plain" )
{
$args[] = "user=".$_SESSION['username'];
$args[] = "pass=".$_SESSION['password'];
}
elseif ( ZM_AUTH_RELAY == "none" )
{
$args[] = "user=".$_SESSION['username'];
}
}
if ( !in_array( "mode=single", $args ) && !empty($GLOBALS['connkey']) )
{
$args[] = "connkey=".$GLOBALS['connkey'];
}
if ( ZM_RAND_STREAM )
{
$args[] = "rand=".time();
}
if ( count($args) )
{
$streamSrc .= "?".join( $querySep, $args );
}
return( $streamSrc );
}
i really appreciate your help in all this, hope we can solve this in some way
Regards
Re: Not Streaming on monitor
Posted: Thu Dec 03, 2015 1:15 pm
by knight-of-ni
Until you address the error I pointed out in my previous post, you are going to continue to get socket_sendto errors.
viewtopic.php?p=90872#p90859
Re: Not Streaming on monitor
Posted: Thu Dec 03, 2015 3:52 pm
by vmos
Until you address the error I pointed out in my previous post, you are going to continue to get socket_sendto errors.
viewtopic.php?p=90872#p90859
i already fix this and i dont have more errors in apache related to symlinks, i dont know what else i cant check in apache or what conf see for solve this, however i tried the android app and this crash when i tried to open the monitor, but i was able to stream with vlc using this
Code: Select all
http://zoneminder-server-ip/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=10&buffer=1000&user=username&password=password
and saving as .asf file and opening with vlc, finally i am able to see the video stream, so the problems as you say before seems to be in apache conf maybe
this is my actual apache.conf file
Code: Select all
Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www>
php_flag register_globals off
Options Indexes FollowSymLinks
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch +FollowSymLinks
Order allow,deny
Allow from all
</Directory>
i dont know what else i can do
Regards
Re: Not Streaming on monitor
Posted: Thu Dec 03, 2015 4:23 pm
by knight-of-ni
Ok, good. We can move forward then.
Post the output of this:
You also need to check the value of PATH_ZMS under Options.
Based on the ScriptAlias you provided, the value for PATH_ZMS needs to be "/cgi-bin/nph-zms"