Shared Memory Issue

Support and queries relating to all previous versions of ZoneMinder
cparker
Posts: 27
Joined: Wed Oct 11, 2006 9:43 pm
Location: Massachusetts, US
Contact:

Post by cparker »

That doesn't say anything. My Apache2 server is serving correct headers, and I renamed the file. Here's exactly what I did.

Code: Select all

cd /var/www
wget http://192.168.10.9/snapshot.html
mv snapshot.html snapshot.jpg
That's just a flat JPEG file. But it does show that something is, in fact, wrong with zms (which is where the errors are showing up in /var/log/apache2/error.log). That's not a guarantee that something isn't also wrong with the NC800's firmware, which I still insist was written (in part) by a crackhead. ;) :lol: Only such a person would set up a JPEG file with a .html extension in a commercial product. Not to mention the HTTP header problems...

I remember during the ./configure stage of setup seeing a message about being able to enable some sort of a debug mode. Would that tell me what's going on with zms?
Christopher C. Parker
Free Software Foundation Associate Member #795
You, too, can join the FSF as an Associate Member!
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

It would be more helpful to either grant access to your zm box or forward a port to the camera so we (James or myself) can do the digging.
As I was glancing through the post (Like usual :roll: ) I thought you might have provided access to the camera and not a file you captured and placed on a apache server. Not very helpful to us to help you.
Also as stated before, if zmc can not get an image... then there is nothing for zms to stream.

You can enable debug under the debug tab in options:
Set the ZM_EXTRA_DEBUG_TARGET = _zmc to limit your debug only to the zmc component and _zms for the zms component.

Have you checked your firmware version?
Latest on gadspot NC800 IP Networking Camera Firmware Update V4.0f

Regards,
Corey
Image
Image
3939663646337

It's better to keep your mouth shut and appear stupid than open it and remove all doubt.
-Mark Twain
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

re your zms issue, how can zms stream an image it cant get. Get your cam stable then maon about zms. There may be a problem with zms on your machine im not saying there isnt. But my server had issues to and i know that is correctly built. RE remote access If corey is offering he is way better at deep stuff than me so id take his offer

James
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
cparker
Posts: 27
Joined: Wed Oct 11, 2006 9:43 pm
Location: Massachusetts, US
Contact:

Post by cparker »

cordel wrote:It would be more helpful to either grant access to your zm box or forward a port to the camera so we (James or myself) can do the digging.
As I was glancing through the post (Like usual :roll: ) I thought you might have provided access to the camera and not a file you captured and placed on a apache server. Not very helpful to us to help you.
Also as stated before, if zmc can not get an image... then there is nothing for zms to stream.

You can enable debug under the debug tab in options:
Set the ZM_EXTRA_DEBUG_TARGET = _zmc to limit your debug only to the zmc component and _zms for the zms component.

Have you checked your firmware version?
Latest on gadspot NC800 IP Networking Camera Firmware Update V4.0f

Regards,
Corey
I tried to go with the most simple route possible. My install of ZM cannot grab a single JPEG from the hard drive, so there's definitely a problem with the installation. The fact that two other people *CAN* access the JPEG without a problem provided the proof I needed to determine this. For that, I thank you. :)

I'm still trying to work out getting portforwarding to work behind a machine that is already portforwarding. I have a router that is forwarding ports to the ZoneMinder machine, so now I need to forward ports from the ZoneMinder machine to the camera.

I've enabled the extra debugging for zms and changed the debug level to 9. If zms is having a problem, I WILL find the source of it. Thank you for pointing me in the correct direction.

I e-mailed GadSpot support a few days ago inquiring about an updated FirmWare. The latest firmware for my camera V3.1f 10/27/05, according to http://www.gadspot.com/information.php?info_id=11. Where did you find 4.0f??

EDIT 0:
OK, I've gotten the chance to test out this log. Here's what I've got so far, at debug level 1:
11/05/06 19:15:58.634366 zms[15565].INF-zm_debug.c/304 [New Debug Level = 1, New Debug Log = /tmp/zm_debug.log.15565]
11/05/06 19:15:58.635892 zms[15565].DB1-zms.cpp/84 [Query: mode=jpeg&monitor=1&scale=100&maxfps=5&user=admin&rand=1162772151]
11/05/06 19:15:58.636721 zms[15565].INF-zm_user.cpp/140 [Authenticated user 'admin']
11/05/06 19:15:58.639664 zms[15565].DB1-zm_monitor.cpp/1871 [Got 1 monitors]
11/05/06 19:15:58.642146 zms[15565].DB1-zm_monitor.cpp/235 [monitor purpose=0]
11/05/06 19:15:58.642579 zms[15565].DB1-zm_monitor.cpp/242 [shm.size=2304964]
11/05/06 19:15:58.642941 zms[15565].ERR-zm_monitor.cpp/290 [Shared memory not initialised by capture daemon]
EDIT 1:
I found 4.0f: http://www.gadget-spot.co.uk/downloads.php
It seems as though GadSpot's non-UK site is deficient and not updated often. Someone from GadSpot might want to look into this. ;)
Last edited by cparker on Mon Nov 06, 2006 3:51 am, edited 1 time in total.
Christopher C. Parker
Free Software Foundation Associate Member #795
You, too, can join the FSF as an Associate Member!
cparker
Posts: 27
Joined: Wed Oct 11, 2006 9:43 pm
Location: Massachusetts, US
Contact:

Post by cparker »

I've set up live log feeds at http://drdandvm.dyndns.org:8080/ so it'll be easier for me (or anyone interested) to investigate zm's logs.

It seems like it is, in fact, a shared memory issue. This from zmwatch.log:
11/05/06 22:20:59.559876 zmwatch[16503].ERR [Can't get shared memory id '7a6d2001', 1: No such file or directory]
This error is generated every time I go to view the monitor I've set up. I'm noticing that the shared memory id is derived from the config value at System/ZM_SHM_KEY, which is currently 0x7a6d2000 (the default from installation; I didn't touch this value).

Is there a file that needs to be created that isn't being created by ZoneMinder? Is this a file that I can touch and be done with it?
Christopher C. Parker
Free Software Foundation Associate Member #795
You, too, can join the FSF as an Associate Member!
cparker
Posts: 27
Joined: Wed Oct 11, 2006 9:43 pm
Location: Massachusetts, US
Contact:

Post by cparker »

I increased the shared memory to 256 MB, and I got an interesting error:
zm_debug.log.02676

11/06/06 12:26:30.426229 zms[2676].INF-zm_debug.c/304 [New Debug Level = 4, New Debug Log = /tmp/zm_debug.log.02676]
11/06/06 12:26:30.428014 zms[2676].DB1-zms.cpp/84 [Query: mode=jpeg&monitor=1&scale=100&maxfps=5&user=admin&rand=1162833982]
11/06/06 12:26:30.429021 zms[2676].INF-zm_user.cpp/140 [Authenticated user 'admin']
11/06/06 12:26:30.432370 zms[2676].DB1-zm_monitor.cpp/1871 [Got 1 monitors]
11/06/06 12:26:30.471600 zms[2676].DB1-zm_monitor.cpp/235 [monitor purpose=0]
11/06/06 12:26:30.471774 zms[2676].DB1-zm_monitor.cpp/242 [shm.size=36864964]
11/06/06 12:26:30.472078 zms[2676].ERR-zm_monitor.cpp/246 [Can't shmget, probably not enough shared memory space free: Invalid argument]
Yet:

Code: Select all

# cat /proc/sys/kernel/shmmax && cat /proc/sys/kernel/shmall
268435456
268435456
And:
Mem: 256964k total, 124296k used, 132668k free, 5968k buffers
Swap: 489972k total, 0k used, 489972k free, 39352k cached
Last edited by cparker on Mon Nov 06, 2006 5:55 pm, edited 1 time in total.
Christopher C. Parker
Free Software Foundation Associate Member #795
You, too, can join the FSF as an Associate Member!
cparker
Posts: 27
Joined: Wed Oct 11, 2006 9:43 pm
Location: Massachusetts, US
Contact:

IT WORKS!!!!!

Post by cparker »

I could've sworn that shmget error was familiar, so I rechecked the FAQ, and saw the reference to ipcrm. I got the shmid via ipcs, then removed the shared memory segment via:

Code: Select all

ipcrm -m <shmid here>
Now I can see the static JPEG I have at /var/www/snapshot.jpg.

Something so simple... I can't believe I overlooked it!

Thanks all for all of your help and unending patience!

EDIT:
FYI:
zoneminder:/var/www# wget --save-headers --server-response http://192.168.10.9/snapshot.html
--13:12:15-- http://192.168.10.9/snapshot.html
=> `snapshot.html'
Connecting to 192.168.10.9:80... connected.
HTTP request sent, awaiting response...
1 HTTP/1.1 200 OK
2 connection: close
3 CONTENE-LENGTH: 29354

[ <=> ] 29,354 --.--K/s

13:12:15 (326.61 KB/s) - `snapshot.html' saved [29354]
That file is available at http://drdandvm.dyndns.org:8080/snapshot.html
Christopher C. Parker
Free Software Foundation Associate Member #795
You, too, can join the FSF as an Associate Member!
Locked