shared memory not valid

Support and queries relating to all previous versions of ZoneMinder
Locked
gilad
Posts: 1
Joined: Mon Sep 08, 2008 3:12 am
Location: New Jersey

shared memory not valid

Post by gilad »

I am running Ubuntu 8.04 and ZM 1.22.3 using USB WebCam. The camera shows video when using local program like camorama. However, no image is visible when using zoneminder. The error showing on zmwatch.log is shared memory not valid

Looked for at similar posting relate to shared memory and shared memory not valid but could not find a solution that is relevant to my case.


Here are the outputs from different commands

root@laptop:/tmp# zmu -d /dev/video0 -q -v

Video Capabilities
Name: Generic Vimicro 303b
Type: 1
Can capture
Video Channels: 1
Audio Channels: 0
Maximum Width: 640
Maximum Height: 480
Minimum Width: 160
Minimum Height: 120
Window Attributes
X Offset: 0
Y Offset: 0
Width: 320
Height: 240
Picture Attributes
Palette: 4 - 24bit RGB
Colour Depth: 24
Brightness: 32768
Hue: 0
Colour :0
Contrast: 32768
Whiteness: 0
Channel 0 Attributes
Name: ZC301-2
Channel: 0
Flags: 0
Type: 2 - Camera
Format: 2055 – Unknown

gilad@laptop:/tmp$ tail -f zmwatch.log
09/07/2008 23:42:49.257370 zmwatch[3398].INF ['zmc -d /dev/video0' stopping at 08/09/07 23:42:49]
09/07/2008 23:42:59.259720 zmwatch[3398].ERR [Can't get shared memory id '7a6d2001', 1: No such file or directory]
09/07/2008 23:42:59.260690 zmwatch[3398].INF [Restarting capture daemon for New1, shared memory not valid]
09/07/2008 23:42:59.573675 zmwatch[3398].INF [Can't find child with pid of '3432'] at /usr/bin/zmwatch.pl line 119
09/07/2008 23:43:09.576574 zmwatch[3398].ERR [Can't get shared memory id '7a6d2001', 1: No such file or directory]
09/07/2008 23:43:09.577522 zmwatch[3398].INF [Restarting capture daemon for New1, shared memory not valid]
09/07/2008 23:43:09.782423 zmwatch[3398].INF ['zmc -d /dev/video0' stopping at 08/09/07 23:43:09]

gilad@laptop:/tmp$ head zmdc.log

09/07/2008 23:41:54.043462 zmdc[3370].INF [Server starting at 08/09/07 23:41:54]
09/07/2008 23:41:57.288060 zmdc[3370].INF [Can't find child with pid of '3392']
09/07/2008 23:41:57.288960 zmdc[3370].INF ['zmc -d /dev/video0' starting at 08/09/07 23:41:57, pid = 3392]
09/07/2008 23:41:57.497089 zmdc[3370].INF ['zmfilter.pl' starting at 08/09/07 23:41:57, pid = 3394]
09/07/2008 23:41:57.865099 zmdc[3370].INF ['zmaudit.pl -c' starting at 08/09/07 23:41:57, pid = 3396]
09/07/2008 23:41:58.313076 zmdc[3370].INF ['zmwatch.pl' starting at 08/09/07 23:41:58, pid = 3398]
09/07/2008 23:42:28.718658 zmdc[3370].INF ['zmc -d /dev/video0' stopping at 08/09/07 23:42:28]
09/07/2008 23:42:39.044133 zmdc[3370].INF [Can't find child with pid of '3414']
09/07/2008 23:42:39.044953 zmdc[3370].INF ['zmc -d /dev/video0' starting at 08/09/07 23:42:39, pid = 3414]
09/07/2008 23:42:49.248456 zmdc[3370].INF ['zmc -d /dev/video0' stopping at 08/09/07 23:42:49]

root@laptop:/tmp# lsusb
Bus 001 Device 003: ID 046d:c01b Logitech, Inc. MX310 Optical Mouse
Bus 001 Device 002: ID 0ac8:303b Z-Star Microelectronics Corp. ZC0303 WebCam
Bus 001 Device 001: ID 0000:0000


root@laptop:/tmp# dmesg |grep -i zc

[ 40.512735] /build/buildd/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-generic/media/gsp
cav1/gspca_core.c: USB GSPCA camera found.(ZC3XX)
[ 42.113085] zc0301: V4L2 driver for ZC0301[P] Image Processor and Control Chip v1:1.10
[ 42.113169] usbcore: registered new interface driver zc0301
[/b]
User avatar
tony
Posts: 29
Joined: Mon Dec 29, 2003 8:30 pm

Post by tony »

any answer to this? I have exactly the same problem, video works in xawtv but no picture in zoneminder

same messages in logs, ubuntu v8 zm v1.23.3
using a 4 channel video capture card.
zmu -d /dev/video0 -q -v
Video Capabilities
Name: BT878 video (ProVideo PV150)
Type: 171
Can capture
Can tune
Overlay onto frame buffer
Can clip
Scalable
Video Channels: 2
Audio Channels: 0
Maximum Width: 924
Maximum Height: 576
Minimum Width: 48
Minimum Height: 32
Window Attributes
X Offset: 0
Y Offset: 0
Width: 352
Height: 288
Picture Attributes
Palette: 4 - 24bit RGB
Colour Depth: 24
Brightness: 32768
Hue: 32768
Colour :32768
Contrast: 32768
Whiteness: 0
Channel 0 Attributes
Name: Composite0
Channel: 0
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 0 - PAL
Channel 1 Attributes
Name: Composite1
Channel: 1
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 0 - PAL

tail -f zmwatch.log
09/29/08 21:22:33.866289 zmwatch[9435].INF [Restarting capture daemon for New, shared memory not valid]
09/29/08 21:22:33.953962 zmwatch[9435].INF ['zmc -d /dev/video' starting at 08/09/29 21:22:33, pid = 9739]
09/29/08 21:22:43.954790 zmwatch[9435].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
09/29/08 21:22:43.954992 zmwatch[9435].INF [Restarting capture daemon for New, shared memory not valid]
09/29/08 21:22:44.042412 zmwatch[9435].INF ['zmc -d /dev/video' starting at 08/09/29 21:22:44, pid = 9743]
09/29/08 21:22:54.043149 zmwatch[9435].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
09/29/08 21:22:54.043356 zmwatch[9435].INF [Restarting capture daemon for New, shared memory not valid]
09/29/08 21:22:54.130446 zmwatch[9435].INF ['zmc -d /dev/video' starting at 08/09/29 21:22:54, pid = 9747]
09/29/08 21:29:23.968333 zmwatch[11678].INF [Watchdog starting]
09/29/08 21:29:23.968666 zmwatch[11678].INF [Watchdog pausing for 30 seconds]

head zmdc.log
09/29/08 21:15:16.886836 zmdc[9405].INF [Server starting at 08/09/29 21:15:16]
09/29/08 21:15:19.976439 zmdc[9405].INF ['zmc -d /dev/video' starting at 08/09/29 21:15:19, pid = 9427]
09/29/08 21:15:20.009764 zmdc[9405].ERR ['zmc -d /dev/video' exited abnormally, exit status 255]
09/29/08 21:15:20.009956 zmdc[9405].INF [Starting pending process, zmc -d /dev/video]
09/29/08 21:15:20.012162 zmdc[9405].INF ['zmc -d /dev/video' starting at 08/09/29 21:15:20, pid = 9429]
09/29/08 21:15:20.017700 zmdc[9405].ERR ['zmc -d /dev/video' exited abnormally, exit status 255]
09/29/08 21:15:20.062557 zmdc[9405].INF ['zmfilter.pl' starting at 08/09/29 21:15:20, pid = 9431]
09/29/08 21:15:20.149071 zmdc[9405].INF ['zmaudit.pl -c' starting at 08/09/29 21:15:20, pid = 9433]
09/29/08 21:15:20.236742 zmdc[9405].INF ['zmwatch.pl' starting at 08/09/29 21:15:20, pid = 9435]
09/29/08 21:15:20.323797 zmdc[9405].INF ['zmupdate.pl -c' starting at 08/09/29 21:15:20, pid = 9439]

UPDATE: there is a still picture when I go to "zones" so it seems to be receiving a picture just not displying it
(also noticed that this is in the v1.22.x forum)


tony
User avatar
tony
Posts: 29
Joined: Mon Dec 29, 2003 8:30 pm

Post by tony »

well I found the problem with my installation, it was an incorrectly set up cgi-bin directory!
I use a virtual server eg "http://zm.<domain>.com" and needed to add a cgi alias to the directory with the zm cgi programs in

tony
Rusty
Posts: 3
Joined: Tue Mar 24, 2009 2:18 am

Post by Rusty »

Try

sudo adduser www-data video


This seamed to help me but now I get "Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]"

Still working on it ... )

http://www.howtoforge.com/video_surveil ... der_ubuntu
ddalton
Posts: 67
Joined: Wed Jun 22, 2005 6:53 pm

Post by ddalton »

I have just switch to IP wireless cameras Trendnet IP312W's and I get the same message:

zmwatch[3769].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]

my cgi-bin directory is correct as well
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

See documentation


edit /etc/sysctl.conf and add the following lines (for 128meg shared mem)

kernel.shmall = 134217728
kernel.shmmax = 134217728
ddalton
Posts: 67
Joined: Wed Jun 22, 2005 6:53 pm

Post by ddalton »

my current sysctl.conf values are:

kernel.shmmax = 68719476736
kernel.shmall = 4294967296


So I dont think the are the problem, they are much higher than documentations recommended values
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

are they too high aka you have more ram allocated than you have
kernel.shmmax = 68719476736
do you have 6.8gigs of ram
ddalton
Posts: 67
Joined: Wed Jun 22, 2005 6:53 pm

Post by ddalton »

odd these are the default values on centos server 5.3
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

odd these are the default values on centos server 5.3
I am running Ubuntu 8.04 and ZM 1.22.3
and for the record ubuntu dosen't set it by defualt
ddalton
Posts: 67
Joined: Wed Jun 22, 2005 6:53 pm

Post by ddalton »

now I am just getting the messages:

08/11/09 12:14:04.077973 zmdc[4389].INF ['zmc -m 1' starting at 09/08/11 12:1:04, pid = 4482]
08/11/09 12:14:04.781754 zmdc[4389].ERR ['zmc -m 1' exited abnormally, exit satus 255]

08/11/09 12:14:01.057785 zmdc[4389].INF ['zmc -m 2' starting at 09/08/11 12:14:01, pid = 4480]
08/11/09 12:14:01.574097 zmdc[4389].ERR ['zmc -m 2' exited abnormally, exit status 255]
ruffyen
Posts: 1
Joined: Fri Aug 28, 2009 2:08 pm

Post by ruffyen »

The way that I was able to fix this issue was by chmod'ing /dev/video0 with 666

ie chmod 666 /dev/video0

may not be the most secure way to do it...but its working :)...

[EDIT]
but that is just a quick dirty fix...my real issue was that i didnt have some permissions set right. After following the directions in the Wiki related to installing by .deb it worked fine. Now to address my USB bus issues only allowing one camera at a time :(
Locked