Getting ajax problems creating temporary sock files.

Forum for questions and support relating to the 1.24.x releases only.
Locked
jeffshern
Posts: 18
Joined: Wed Jan 18, 2006 3:27 pm
Location: Colorado

Getting ajax problems creating temporary sock files.

Post by jeffshern »

I upgraded from 1.23.3 to 1.24.2 yesterday. Running Gentoo on a x64 system. I used the Gentoo ebuild to update.

I am unable to monitor any cameras, I just get an empty image.

Looking in /var/log/apache/error_log I see the following

[Wed Aug 05 10:39:40 2009] [error] [client 192.168.1.100] array (\n 0 => \n array (\n 'file' => '/var/www/zoneminder/htdocs/ajax/stream.php',\n 'line' => 55,\n 'function' => 'ajaxError',\n 'args' => \n array (\n 0 => 'socket_sendto( /var/www/zoneminder/tmp/zms-412582s.sock ) failed: No such file or directory',\n ),\n ),\n 1 => \n array (\n 'file' => '/var/www/zoneminder/htdocs/index.php',\n 'line' => 116,\n 'args' => \n array (\n 0 => '/var/www/zoneminder/htdocs/ajax/stream.php',\n ),\n 'function' => 'require_once',\n ),\n), referer: http://192.168.1.69:800/?view=watch&mid=1

Originally it was using /tmp.. I thought that maybe this had something to do with it. I made a /var/www/zoneminder/tmp folder that was apache:apache and 777. Then I configured ZM to use that as it's temp folder. This didn't help.


Messages is getting flooded with the following:

Aug 5 10:45:29 security zma_m8[7638]: WAR [Waiting for capture daemon]
Aug 5 10:45:30 security zma_m8[7638]: WAR [Waiting for capture daemon]
Aug 5 10:45:31 security zma_m8[7638]: WAR [Waiting for capture daemon]
Aug 5 10:45:32 security zma_m8[7638]: WAR [Waiting for capture daemon]
Aug 5 10:45:33 security zma_m8[7638]: WAR [Waiting for capture daemon]
Aug 5 10:45:34 security zma_m8[7638]: WAR [Waiting for capture daemon]
Aug 5 10:45:35 security zma_m8[7638]: WAR [Waiting for capture daemon]
Aug 5 10:45:36 security zma_m8[7638]: WAR [Waiting for capture daemon]

I've searched through the other forum messages and haven't really found a clear answer on this.

The only other thing that I do that is odd is this:

security www # pwd
/var/www
security www # ls -al
lrwxrwxrwx 1 root root 11 Aug 5 09:12 localhost -> zoneminder/
drwxr-xr-x 5 root root 120 Aug 5 10:37 zoneminder


Any ideas?!?

Thanks,

Jeff
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Turn up debug in zm to get more detail on what the error is and should make since in the debug log.

If capture is failing, then an error from the web console trying to stream something that's not available is expected.
jeffshern
Posts: 18
Joined: Wed Jan 18, 2006 3:27 pm
Location: Colorado

Post by jeffshern »

I cleaned it up a bit, but here is some of the debug log.



08/05/09 11:58:10.651746 zms[-1].DB1-zm_monitor.cpp/2262 [Got 1 monitors]
08/05/09 11:58:10.656651 zms[-1].DB1-zm_monitor.cpp/338 [monitor purpose=0]
08/05/09 11:58:10.656716 zms[-1].DB1-zm_monitor.cpp/345 [mem.size=82946164]
08/05/09 11:58:10.657026 zms[-1].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 720x480 - Rgb:ff0000, CM:3, MnAT:15, MxAT:0, MnAP:50, MxAP:75000, FB:3x3, MnFP:50, MxFP:50000, MnBS:10, MxBS:0, MnB:0, MxB:0, OF: 0]
08/05/09 11:58:10.764693 zms[-1].DB1-zm_monitor.cpp/458 [Monitor DriveWay has function 3]
08/05/09 11:58:10.764734 zms[-1].DB1-zm_monitor.cpp/459 [Monitor DriveWay LBF = '%N - %m/%d/%y %H:%M:%S', LBX = 0, LBY = 0]
08/05/09 11:58:10.764754 zms[-1].DB1-zm_monitor.cpp/460 [Monitor DriveWay IBC = 80, WUC = 25, pEC = 20, PEC = 20, EAF = 1, FRI = 1000, RBP = 8, FM = 0]
08/05/09 11:58:10.764777 zms[-1].DB1-zm_monitor.cpp/2459 [Loaded monitor 1(DriveWay), 0 zones]
08/05/09 11:58:10.764934 zms[-1].DB3-zm_stream.cpp/58 [FPS:0.00, MXFPS:5.00, BFPS:0.00, EFPS:0.00, FM:1]
08/05/09 11:58:10.764967 zms[-1].DB3-zm_stream.cpp/65 [aEFPS:0.00, aFM:1]
08/05/09 11:58:10.765097 zms[-1].DB2-zm_monitor.cpp/3374 [Checking swap image location]
08/05/09 11:58:10.765121 zms[-1].DB3-zm_monitor.cpp/3375 [Checking swap image path]
08/05/09 11:58:10.765185 zms[-1].DB3-zm_monitor.cpp/2868 [Swap path '/var/www/zoneminder/tmp/zmswap-m1/zmswap-q532249' missing, creating]
08/05/09 11:58:10.774967 zms[-1].DB2-zm_monitor.cpp/3396 [Assigning temporary buffer]
08/05/09 11:58:10.782717 zms[-1].DB2-zm_monitor.cpp/3399 [Assigned temporary buffer]
08/05/09 11:58:11.286611 zms[-1].ERR-zm_monitor.cpp/3579 [Terminating, last frame sent time 1249495090.782791 secs more than maximum of 10.000000]
08/05/09 11:58:11.287007 zms[-1].DB1-zm_monitor.cpp/3588 [Cleaning swap files from /var/www/zoneminder/tmp/zmswap-m1/zmswap-q532249]
08/05/09 11:58:11.287120 zms[-1].DB1-zm_monitor.cpp/3616 [Can't glob '/var/www/zoneminder/tmp/zmswap-m1/zmswap-q532249/*.*': 3]

....


08/05/09 12:00:44.433921 zmc_dvideo1[-1].DB1-zm_monitor.cpp/1814 [Loaded monitor 10(basement1), 1 zones]
08/05/09 12:00:44.433958 zmc_dvideo1[-1].INF-zmc.cpp/188 [Starting Capture]
08/05/09 12:00:44.435335 zmc_dvideo1[-1].DB3-zm_local_camera.cpp/349 [Opening video device /dev/video1]
08/05/09 12:00:44.435400 zmc_dvideo1[-1].DB2-zm_local_camera.cpp/355 [V4L2 support enabled, using V4L1 api]
08/05/09 12:00:44.435421 zmc_dvideo1[-1].DB3-zm_local_camera.cpp/502 [Configuring picture attributes]
08/05/09 12:00:44.435454 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/509 [Old P:4]
08/05/09 12:00:44.435474 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/510 [Old D:24]
08/05/09 12:00:44.435494 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/511 [Old B:32768]
08/05/09 12:00:44.435524 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/512 [Old h:32768]
08/05/09 12:00:44.435544 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/513 [Old Cl:32768]
08/05/09 12:00:44.435564 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/514 [Old Cn:32768]
08/05/09 12:00:44.435595 zmc_dvideo1[-1].DB3-zm_local_camera.cpp/551 [Configuring window attributes]
08/05/09 12:00:44.435617 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/560 [Old X:0]
08/05/09 12:00:44.435637 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/561 [Old Y:0]
08/05/09 12:00:44.435657 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/562 [Old W:320]
08/05/09 12:00:44.435677 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/563 [Old H:240]
08/05/09 12:00:44.435703 zmc_dvideo1[-1].DB3-zm_local_camera.cpp/578 [Setting up request buffers]
08/05/09 12:00:44.435733 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/584 [vmb.frames = 8]
08/05/09 12:00:44.435752 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/585 [vmb.size = 17039360]
08/05/09 12:00:44.435771 zmc_dvideo1[-1].DB3-zm_local_camera.cpp/587 [Setting up 8 frame buffers]
08/05/09 12:00:44.435805 zmc_dvideo1[-1].DB3-zm_local_camera.cpp/612 [Configuring video source]
08/05/09 12:00:44.435831 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/620 [Old C:0]
08/05/09 12:00:44.435851 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/621 [Old F:1]
08/05/09 12:00:44.435870 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/622 [Old Fl:0]
08/05/09 12:00:44.435890 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/623 [Old T:2]
08/05/09 12:00:44.435924 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/638 [New X:0]
08/05/09 12:00:44.435943 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/639 [New Y:0]
08/05/09 12:00:44.435962 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/640 [New W:320]
08/05/09 12:00:44.435981 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/641 [New H:240]
08/05/09 12:00:44.436003 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/646 [New P:4]
08/05/09 12:00:44.436023 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/647 [New D:24]
08/05/09 12:00:44.436042 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/648 [New B:32768]
08/05/09 12:00:44.436062 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/649 [New h:32768]
08/05/09 12:00:44.436082 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/650 [New Cl:32768]
08/05/09 12:00:44.436101 zmc_dvideo1[-1].DB4-zm_local_camera.cpp/651 [New Cn:32768]
08/05/09 12:00:44.436121 zmc_dvideo1[-1].DB3-zm_local_camera.cpp/654 [Setting up static colour tables]
08/05/09 12:00:44.436148 zmc_dvideo1[-1].DB2-zm_local_camera.cpp/1439 [Priming capture]
08/05/09 12:00:44.436168 zmc_dvideo1[-1].DB3-zm_local_camera.cpp/1471 [Queueing frame 0]
08/05/09 12:00:44.436205 zmc_dvideo1[-1].ERR-zm_local_camera.cpp/1474 [Capture failure for frame 0: Device or resource busy]
08/05/09 12:00:44.436463 zmc_dvideo1[-1].ERR-zmc.cpp/201 [Failed to prime capture of initial monitor]
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

08/05/09 12:00:44.436205 zmc_dvideo1[-1].ERR-zm_local_camera.cpp/1474 [Capture failure for frame 0: Device or resource busy]
That line stands out.
Is there another application using the device?
What are the devices permissions?
jeffshern
Posts: 18
Joined: Wed Jan 18, 2006 3:27 pm
Location: Colorado

Post by jeffshern »

security dev # ls -al video*
crw-rw---- 1 root video 81, 0 Aug 5 09:38 video0
crw-rw-rw- 1 root video 81, 1 Aug 5 09:38 video1
crw-rw-rw- 1 root video 81, 2 Aug 5 09:38 video2
crw-rw-rw- 1 root video 81, 3 Aug 5 09:38 video3

hmm.. I'll try 777 on them

no luck...

/var/log/apache/error_log

[Wed Aug 05 13:08:10 2009] [error] [client 192.168.1.100] socket_sendto( /var/www/zoneminder/tmp/zms-376525s.sock ) failed: No such file or directory, referer: http://192.168.1.69:800/index.php?view=watch&mid=1
[Wed Aug 05 13:08:10 2009] [error] [client 192.168.1.100] array (\n 0 => \n array (\n 'file' => '/var/www/zoneminder/htdocs/ajax/stream.php',\n 'line' => 55,\n 'function' => 'ajaxError',\n 'args' => \n array (\n 0 => 'socket_sendto( /var/www/zoneminder/tmp/zms-376525s.sock ) failed: No such file or directory',\n ),\n ),\n 1 => \n array (\n 'file' => '/var/www/zoneminder/htdocs/index.php',\n 'line' => 116,\n 'args' => \n array (\n 0 => '/var/www/zoneminder/htdocs/ajax/stream.php',\n ),\n 'function' => 'require_once',\n ),\n), referer: http://192.168.1.69:800/index.php?view=watch&mid=1


debug_log:



08/05/09 13:08:01.069876 zms[-1].DB2-zm_monitor.cpp/3374 [Checking swap image location]
08/05/09 13:08:01.069900 zms[-1].DB3-zm_monitor.cpp/3375 [Checking swap image path]
08/05/09 13:08:01.069960 zms[-1].DB3-zm_monitor.cpp/2868 [Swap path '/var/www/zoneminder/tmp/zmswap-m1/zmswap-q376525' missing, creating]
08/05/09 13:08:01.070030 zms[-1].DB2-zm_monitor.cpp/3396 [Assigning temporary buffer]
08/05/09 13:08:01.077360 zms[-1].DB2-zm_monitor.cpp/3399 [Assigned temporary buffer]
08/05/09 13:08:01.580830 zms[-1].ERR-zm_monitor.cpp/3579 [Terminating, last frame sent time 1249499281.077428 secs more than maximum of 10.000000]
08/05/09 13:08:01.581286 zms[-1].DB1-zm_monitor.cpp/3588 [Cleaning swap files from /var/www/zoneminder/tmp/zmswap-m1/zmswap-q376525]
08/05/09 13:08:01.581489 zms[-1].DB1-zm_monitor.cpp/3616 [Can't glob '/var/www/zoneminder/tmp/zmswap-m1/zmswap-q376525/*.*': 3]


08/05/09 13:08:15.280637 zmc_dvideo3[-1].DB9-zm_image.cpp/1316 [x:216, y:479.00]
08/05/09 13:08:15.280657 zmc_dvideo3[-1].DB9-zm_image.cpp/1316 [x:215, y:479.00]


Any way to keep this from wrapping?
curtishall
Posts: 440
Joined: Sat Sep 25, 2004 12:45 am
Location: Fulton, MO

Post by curtishall »

jeffshern wrote:socket_sendto( /var/www/zoneminder/tmp/zms-376525s.sock ) failed: No such file or directory, referer: http://192.168.1.69:800/index.php?view=watch&mid=1
[Wed Aug 05 13:08:10 2009] [error] [client 192.168.1.100] array (\n 0 => \n array (\n 'file' => '/var/www/zoneminder/htdocs/ajax/stream.php',\n 'line' => 55,\n 'function' => 'ajaxError',\n 'args' => \n array (\n 0 => 'socket_sendto( /var/www/zoneminder/tmp/zms-376525s.sock ) failed: No such file or directory',\n ),\n ),\n 1 => \n array (\n 'file' => '/var/www/zoneminder/htdocs/index.php',\n 'line' => 116,\n 'args' => \n array (\n 0 => '/var/www/zoneminder/htdocs/ajax/stream.php',\n ),\n 'function' => 'require_once',\n ),\n), referer: http://192.168.1.69:800/index.php?view=watch&mid=1
It doesn't appear to be creating the socket. Check permissions on /var/www/zoneminder/tmp
--
Curtis Hall
Bluecherry
www.bluecherrydvr.com
store.bluecherry.net
jeffshern
Posts: 18
Joined: Wed Jan 18, 2006 3:27 pm
Location: Colorado

Post by jeffshern »

security tmp # pwd
/var/www/zoneminder/tmp
security tmp # ls -al
total 1313
drwxrwxrwx 5 apache apache 480 Aug 5 14:14 .
drwxr-xr-x 5 root root 120 Aug 5 10:37 ..
-rw-r--r-- 1 root root 230470 Aug 5 13:08 1
-rw-r--r-- 1 root root 229376 Aug 5 11:59 zm_debug-bak.log
-rw-r--r-- 1 apache apache 391959 Aug 5 14:16 zm_debug.log
-rw-r--r-- 1 root root 391959 Aug 5 13:07 zm_debug.log1
-rw-r--r-- 1 apache apache 18060 Aug 5 13:49 zmaudit.log
-rw-r--r-- 1 apache apache 98100 Aug 5 14:16 zmdc.log
srwxr-xr-x 1 apache apache 0 Aug 5 14:10 zmdc.sock
-rw-r--r-- 1 apache apache 5205 Aug 5 14:11 zmfilter.log
-rw-r--r-- 1 apache apache 359 Aug 5 14:10 zmpkg.log
drwxr-xr-x 2 apache apache 48 Aug 5 14:13 zmswap-m1
drwxr-xr-x 2 apache apache 48 Aug 5 14:14 zmswap-m10
drwxr-xr-x 2 apache apache 48 Aug 5 14:14 zmswap-m8
-rw-r--r-- 1 apache apache 0 Aug 5 10:38 zmupdate.log
-rw-r--r-- 1 apache apache 2386 Aug 5 14:11 zmwatch.log
jeffshern
Posts: 18
Joined: Wed Jan 18, 2006 3:27 pm
Location: Colorado

Post by jeffshern »

Other note worthy observations:

1. I couldn't build 1.24.2 unless i set ZM_SSL_LIB=openssl

2. I built without ffmpeg support. (I'm trying to put this back in as I speak..)

3. I did a fuser on /dev/video* and no one was using it.
jeffshern
Posts: 18
Joined: Wed Jan 18, 2006 3:27 pm
Location: Colorado

Post by jeffshern »

Update!!!

I recompiled with ffmpeg support, and now everything seems to work fine.

(I still am using openssl..)
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

First, I would concern your self to making sure that ZM can get images from the device.

Verify that the card is configured correctly and that ZM is configured correctly.
Once you see in zmdc.log that zmc is capturing images, then you can move on to other issues, but while zmc is failing to capture images there is a lot of collateral possible just from that one problem. Capture has to work before anything else will.

Check dmesg and be sure that the card is detected and/or configured correctly.
Check with xawtv and make sure it's working.
Close xawtv, and check your config in ZM, Bump up the debug to 4 or 5, then start it up and watch the messages and zmdc.log log files and check the debug logs for more detailed info.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

jeffshern wrote:Update!!!

I recompiled with ffmpeg support, and now everything seems to work fine.

(I still am using openssl..)
:lol: Glad you got it sorted :D
Locked