Please help -- Not able to view images (first time user)

Support and queries relating to all previous versions of ZoneMinder
Locked
nealc
Posts: 6
Joined: Mon Oct 01, 2007 6:07 pm

Please help -- Not able to view images (first time user)

Post by nealc »

Hi everyone.

I'm having problems viewing the monitors I have set up for a couple of IP cameras. The image is blank. I think I correctly added the ip address and the related fields in the source tab:

Remote Hostname = 192.168.X.XXX
Remote Host port = 8080
Remote Host path = /now.jpg

In ZoneMinder the image is blank with the following location:
http://localhost/cgi-bin/nph-zms?mode=j ... 1191355212

I'm not sure what I'm doing wrong. I looked through the forums but didn't find anything that would help me solve the problem.

BTW, I'm using Fedora 7.

I'd really appreciate any help on this matter. Thanks in advance :)

-Neal
nealc
Posts: 6
Joined: Mon Oct 01, 2007 6:07 pm

Post by nealc »

I enabled the extra debugging in the zmc module and I think the problem is related to shared memory. Here's what I found in the log file:

10/02/07 17:01:11.287885 zmc_m2[21400].INF-zm_debug.c/304 [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.21400]
10/02/07 17:01:11.288270 zmc_m2[21400].DB1-zm_monitor.cpp/1899 [Got 1 monitors]
10/02/07 17:01:11.288361 zmc_m2[21400].DB2-zm_remote_camera.cpp/124 [Request: GET /cgi-bin/nph-image HTTP/1.1
User-Agent: ZoneMinder/1.22.3
Host: 192.168.1.203
Connection: Keep-Alive

]
10/02/07 17:01:11.289494 zmc_m2[21400].DB1-zm_monitor.cpp/253 [monitor purpose=1]
10/02/07 17:01:11.289525 zmc_m2[21400].DB1-zm_monitor.cpp/260 [shm.size=36865188]
10/02/07 17:01:11.289566 zmc_m2[21400].ERR-zm_monitor.cpp/264 [Can't shmget, probably not enough shared memory space free:
Invalid argument]
JohnnyLaww
Posts: 20
Joined: Sun Sep 23, 2007 1:46 am

More info needed..

Post by JohnnyLaww »

nealc,

We probally need a little more info...

ie.. Which IP Cameras are you using, Which Capture card, sysctl.conf settings, and the like...
hushpuppy
Posts: 147
Joined: Wed Aug 08, 2007 10:28 am

Post by hushpuppy »

[Can't shmget, probably not enough shared memory space free:
Invalid argument]
Thats a common problem, search for kernel.shmmax or kernel.shmall on the forums, also if you read the faq, it mentions this there as well.

Before you do though, why not try this, start with one camera, remove the other from the console.

Make the image size smaller 160 x 120 is a good staring point, also start off with a grey image instead of rgb24 etc.

All these settings you can change on the source link.

Can you see an image by inputting the address into a browser ?.
nealc
Posts: 6
Joined: Mon Oct 01, 2007 6:07 pm

Post by nealc »

Thanks guys. Let me look through the forum as suggested. I'll let you know how it works out.

Yes, I can view the cameras through the browser using the address.
nealc
Posts: 6
Joined: Mon Oct 01, 2007 6:07 pm

Post by nealc »

Hushpuppy,

As you suggested, I changed my setup to just one camera, an image size of 160x120, and grey image.

I still don't get an image. In the zmwatch.log file I have the following error:

10/03/2007 09:26:49.129531 zmwatch[21261].INF ['zmc -m 1' starting at 07/10/03 09:26:49, pid = 21308]

10/03/2007 09:28:29.137933 zmwatch[21261].INF [Restarting capture daemon for Construction, shared memory not valid]

You can see the image by typing the following address into a browser:
http://192.168.1.201:8080/now.jpg

I have 2 GB of RAM.
shmall = 134217728
shmmax = 134217728

The contents of my sysctl.conf file is:

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

kernel.shmall = 134217728
kernel.shmmax = 134217728

I made changes to shared memory, restarted my machine and I still get the following error:

10/03/2007 10:14:52.306829 zmwatch[3626].INF [Watchdog starting]
10/03/2007 10:14:52.307212 zmwatch[3626].INF [Watchdog pausing for 30 seconds]
10/03/2007 10:16:12.312669 zmwatch[3626].ERR [Can't get shared memory id '7a6d20
01', 1: No such file or directory]
10/03/2007 10:16:12.312905 zmwatch[3626].INF [Restarting capture daemon for Cons
truction, shared memory not valid]
10/03/2007 10:16:12.427770 zmwatch[3626].INF ['zmc -m 1' starting at 07/10/03 10
:16:12, pid = 3678]

Here's the output of ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 131072
max total shared memory (kbytes) = 536870912
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 = 16
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384


Please let me know if you need any additional info. I really need help and appreciate any feedback.

Thanks,
Neal
Last edited by nealc on Wed Oct 03, 2007 3:15 pm, edited 1 time in total.
hushpuppy
Posts: 147
Joined: Wed Aug 08, 2007 10:28 am

Post by hushpuppy »

Can you turn on debugging and make it as high as possible, also edit httpd.conf (apache) and again turn up debugging (LogLevel debug), then restart apache.

If i want to watch whats happening in a log file i do this in an xterminal (assuming were looking at apache log file)

tail -f /usr/local/apache2/logs/error_log

Then any errors are constantly updated in the xterminal window.

As a side note, i've been developing a live zoneminder cd, it's taken a while, but i should be uploading the latest version this evening, ive fixed numerous bugs in it, and it now runs almost faultlessly.

Maybe you'd like to try that out and see if that works for you.

From bootup to a working zm system takes me 2 minutes, and thats with NO settings stored anywhere.
nealc
Posts: 6
Joined: Mon Oct 01, 2007 6:07 pm

Post by nealc »

hushpuppy,

I set apache to debug mode and I get the following error:

[Wed Oct 03 12:31:22 2007] [error] [client 192.168.1.1] Directory index forbidden by Options directive: /var/www/html/
[Wed Oct 03 12:32:28 2007] [error] [client 192.168.1.1] Directory index forbidden by Options directive: /var/www/html/
[Wed Oct 03 12:33:26 2007] [error] [client 192.168.1.1] Directory index forbidden by Options directive: /var/www/html/

I also have a question regarding ZM_PATH_ZMS. What should it be? Right now it's pointing to /cgi-bin/nph-zms. Is it relative to /var/www? That module resides in /var/www/cgi-bin/nph-zms

Debugging is on in ZM and is set to 9. However, no detailed log files are generated anymore. The normal log files are there though. It worked yesterday...am I missing something?


Eventually (once this all works), I need to interface ZM with my other application. I'll need to write wrappers in order to do this. Will this still be possible if I use your live zoneminder cd?
nealc
Posts: 6
Joined: Mon Oct 01, 2007 6:07 pm

Post by nealc »

hushpuppy,

where can i download your version of the live zoneminder cd?

thanks!
Locked