error 404 on viewing monitor

Forum for questions and support relating to the 1.24.x releases only.
Locked
davidea
Posts: 4
Joined: Fri May 15, 2009 9:21 pm
Location: italy

error 404 on viewing monitor

Post by davidea »

hi at all!!!
i've installed zm on my server, but it don't go!
ill' explain better,
zm, works, it see the camera recognized, usb, or network, it detect the motion, but if i click on the link to view the camera, the page is without the image, yes, i've the button, but there aren't any image, i've tried to switch to movie instead of jpg, but the result is a blank screen.
i've installed a virtual machine too to test all and it's work fine!!!
all my machine are ubuntu 9.04 server (without graphics) and

uname -r say

2.6.28-11-server

the zm version is 1.24.1 installed from a deb archive, but first i've tried the default 1.23.3 from repository, the 1.24.1 from source and is the same issue

the production machine have installed ispconfig webpanel , but i've enabled the cgi support too, and 've made a simlink from /var/www/web/www/zm to the real path /usr/share/zoneminder/

i'll see the log on the production machine, and i see :

Code: Select all

cat /tmp/zmdc.log

05/15/09 23:30:57.080806 zmdc[20461].INF [Starting pending process, zmc -d /dev/video0]
05/15/09 23:30:57.128887 zmdc[20461].INF ['zmc -d /dev/video0' starting at 09/05/15 23:30:57, pid = 22089]
05/15/09 23:30:57.286037 zmdc[20461].ERR ['zmc -d /dev/video0' exited abnormally, exit status 6]
the usb isn't plugged at this time, i use via mjpg_stream to simulate network camera (i'm at server location at this moment, my office!!)

Code: Select all

cat /tmp/zmwatch.log

05/15/09 16:45:01.111518 zmwatch[3155].INF [Watchdog starting]
05/15/09 16:45:01.142615 zmwatch[3155].INF [Watchdog pausing for 30 seconds]
05/15/09 22:55:42.660435 zmwatch[20494].INF [Watchdog starting]
05/15/09 22:55:42.682208 zmwatch[20494].INF [Watchdog pausing for 30 seconds]
05/15/09 23:01:12.738397 zmwatch[20494].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
05/15/09 23:01:22.740823 zmwatch[20494].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
i think the problem is'nt the shared memory,

Code: Select all

the 

ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 65536
max total shared memory (kbytes) = 268435456
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

------ Messages: Limits --------
max queues system wide = 488
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384

Code: Select all

the cat /var/log/apache2/other_vhosts_access.log

www.name.it:80 192.168.1.2 - - [15/May/2009:23:03:40 +0200] "GET /cgi-bin/nph-zms?mode=jpeg&monitor=2&scale=100&maxfps=5&buffer=1000&connkey=174441&rand=1242421418 HTTP/1.1" 404 1199 "http://www.name.it/zm/index.php?view=watch&mid=2" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10"

www.name.it:80 192.168.1.2 - - [15/May/2009:23:28:23 +0200] "GET /cgi-bin/nph-zms?source=event&mode=mpeg&event=2&frame=1&scale=100&rate=100&bitrate=25000&maxfps=5&format=asf&replay=single&connkey=6230&rand=1242422903 HTTP/1.1" 404 1199 "-" "VLC media player - version 0.9.9a Grishenko - (c) 1996-2009 the VideoLAN team"
but in the virtualized server, the log populated is /var/log/apache2/access.log and the same GET request, return a jpg or stream with a 200 return code (OK)

where's the problem???? a little help? who convert the single frame from the source in a jpg to view in the monitor windows??? how can i investigate on this problem??
User avatar
henriquejf
Posts: 77
Joined: Tue Feb 10, 2009 12:01 pm
Location: Brazil

Post by henriquejf »

i don´t think you can go further ignoring the shared memory issue; in my opinion, thats the major problem youre facing;
-----------------------
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
davidea
Posts: 4
Joined: Fri May 15, 2009 9:21 pm
Location: italy

Post by davidea »

henriquejf wrote:i don´t think you can go further ignoring the shared memory issue; in my opinion, thats the major problem youre facing;
i don't think, or please explain where are my error!!!
the virtual machine i've installed at the ipcs command reply:

Code: Select all

ipcs -l

------ Limiti della memoria condivisa --------
numero massimo di segmenti = 4096
dimensione max seg (kbyte) = 65536
max total shared memory (kbytes) = 8388608
dimensione min seg (byte) = 1

------ Limiti di semaforo --------
numero max di matrici = 128
numero max di semafori per matrice = 250
numero max di semafori su tutto il sistema = 32000
numero max opz. per chiamata semop = 32
valore max del semaforo = 32767

------ Messaggi: limiti --------
numero max di code su tutto il sistema = 993
dimensione max del messaggio (byte) = 8192
dimensione massima predefinita della coda (byte) = 16384
the real server instead:


Code: Select all

ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 65536
max total shared memory (kbytes) = 268435456
min seg size (bytes) = 1
then , the real server have more shared mamory ...... why it say "Can't get shared memory "????

adding some hint, if i search for the directory event, with the capturet and analyzed jpg, i found all the jpg, with my face, and the frame analyse with the red marked alert area!!!! the problem is only when i will view the frame from the web interface!!!

the file *.jpg into the event directory, ar marked rw-r--r-- and the user is www-data

how can i inspect where the web interface is searching for event directory?
User avatar
henriquejf
Posts: 77
Joined: Tue Feb 10, 2009 12:01 pm
Location: Brazil

Post by henriquejf »

hi davidea !

in your first post i saw the first thing that called my attention that was
05/15/09 23:01:12.738397 zmwatch[20494].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
but as you have stated later on in the same post that you thought that it was not a shared memory issue; so i suggested that you investigate that better, even that as you said the "ipcs -l " shows ok to you;

I have already fixed the same situation on my system after i got rid of the "Can't get shared memory" lines, but i was using ubuntu 8 series and after updating the packages and tweaking the shared mem and even adjusting the correct swap for the installed memory, i had the issue gone;


Im sorry i cant suggest the correct values for sharedmem, swap, and etc; but im positive you will have your problem gone when you fix the shared mem issues your logs reporting , k?

also tell me if you have tried to update all system packages, even that you are using ubuntu 9.04;

good luck !
-----------------------
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
belanger
Posts: 19
Joined: Wed Apr 15, 2009 10:09 am

Post by belanger »

What does the error log file from your apache (http) server says? I first think this might give you a better idea where to look.
davidea
Posts: 4
Joined: Fri May 15, 2009 9:21 pm
Location: italy

Post by davidea »

the ubuntu version is 9.04 and all is updated , the apache log (i've installed a control panel) is located under /var/log/apache2/other_vhosts_access.log
and say

Code: Select all

www.name.it:80 192.168.1.2 - - [15/May/2009:23:03:40 +0200] "GET /cgi-bin/nph-zms?mode=jpeg&monitor=2&scale=100&maxfps=5&buffer=1000&connkey=174441&rand=1242421418 HTTP/1.1" 404 1199 "http://www.name.it/zm/index.php?view=watch&mid=2" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10"

www.name.it:80 192.168.1.2 - - [15/May/2009:23:28:23 +0200] "GET /cgi-bin/nph-zms?source=event&mode=mpeg&event=2&frame=1&scale=100&rate=100&bitrate=25000&maxfps=5&format=asf&replay=single&connkey=6230&rand=1242422903 HTTP/1.1" 404 1199 "-" "VLC media player - version 0.9.9a Grishenko - (c) 1996-2009 the VideoLAN team" 
the first line is if i will use jpg for viewing the camera, and the second line is if i will see a stream , under the dir ../../zm/cgi-bin/ the file nph-zms is present, then it isn't missing!!
how can i debug the file nph-zms (is a binary!) and how can i see where it seek for the source to display?
xeron
Posts: 2
Joined: Thu May 21, 2009 6:55 am

Post by xeron »

same problem here, using ubuntu 9.04 and the 1.23.3 release (also tested with 1.24)

apache error log:
[Thu May 21 08:56:08 2009] [warn] [client 192.168.1.50] Timeout waiting for output from CGI script /usr/lib/cgi-bin/nph-zms, referer: http://192.168.10.245/zm/index.php?view=watch&mid=2
/tmp/zmdc.log:
05/21/2009 08:57:34.029179 zmdc[12219].INF [Starting pending process, zmc -d /dev/video0]
05/21/2009 08:57:34.030502 zmdc[12219].INF ['zmc -d /dev/video0' starting at 09/05/21 08:57:34, pid = 2964]
05/21/2009 08:57:34.278717 zmdc[12219].ERR ['zmc -d /dev/video0' exited abnormally, exit status 6]
/var/log/messages:
May 21 09:08:05 ubuntu zmdc[3772]: INF [Starting pending process, zmc -d /dev/video0]
May 21 09:08:05 ubuntu zmdc[3772]: INF ['zmc -d /dev/video0' starting at 09/05/21 09:08:05, pid = 3807]
May 21 09:08:05 ubuntu zmdc[3807]: INF ['zmc -d /dev/video0' started at 09/05/21 09:08:05]
May 21 09:08:05 ubuntu zmc_dvideo0[3807]: INF [Debug Level = 0, Debug Log = <none>]
May 21 09:08:05 ubuntu zmc_dvideo0[3807]: INF [Starting Capture]
May 21 09:08:05 ubuntu zmc_dvideo0[3807]: INF [Got signal 6 (Aborted), exiting and forcing backtrace]
ipcs -l:
root@ubuntu:/tmp# ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 4096000
max total shared memory (kbytes) = 16777216000
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

------ Messages: Limits --------
max queues system wide = 1698
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384
My camera is a Logitech QuickCam Pro 3000 USB and works with xavtv

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

Post by cordel »

First off put the shared memory thing behind you and forget about it.

Code: Select all

ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory] 
All that means is there is nothing put in shared memory so likely there is something off in your capture configuration and if it's failing you will find nothing in shared memory.


404 Is an apache server error so you should be working out that error in apache which means file not found.

Fix the apache error then work out why the capture is failing.
Locked