Can't get shared memory

Forum for questions and support relating to the 1.24.x releases only.
Locked
wonderfulll
Posts: 5
Joined: Tue Mar 24, 2009 3:33 pm

Can't get shared memory

Post by wonderfulll »

Hi,
I installed ZM on Ubuntu 8.10 machine from this http://www.zoneminder.com/wiki/index.ph ... ozola-0.7) tutorial.
Everything seems to work just fine.

Now i want add a remote internet camera D-Link DCS-2102.
Remote protocol: RTSP
Remote method: RTSP/RTP
Remote host name: 192.168.1.124
Remote Host Port: 554
Remote Host Path: /jpeg (also tried mp4)

After adding I get no image.

zmwatch.log

Code: Select all

03/24/09 17:42:03.101727 zmwatch[4774].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
/var/log/messages

Code: Select all

Mar 24 17:45:32 anton-linux zms[6353]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]

kernel.shmmax and kernel.shmal is set

Code: Select all

kernel.shmmax = 134217728
kernel.shmall = 134217728

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

Post by cordel »

wonderfulll
Posts: 5
Joined: Tue Mar 24, 2009 3:33 pm

Post by wonderfulll »

set my debug level to 5

zm_debug.log

Code: Select all

/usr/local/bin/zmc: symbol lookup error: /usr/local/bin/zmc: undefined symbol: avformat_all
oc_context
found some similar posts on the forum, so as i understood the problem is with my ffmpeg install
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Check you don't have two versions of ffmpeg installed, ie one from your distro and one you may have compiled yourself.
Phil
wonderfulll
Posts: 5
Joined: Tue Mar 24, 2009 3:33 pm

Post by wonderfulll »

Check you don't have two versions of ffmpeg installed, ie one from your distro and one you may have compiled yourself.
VLC installed ffmpeg.
Completly deleted all ffmpeg distro packages, now i get this

Code: Select all

03/27/09 11:31:20.991207 zmc_m1[12029].DB1-zm_zone.cpp/889 [Got 1 zones for monitor DSC-2102]
03/27/09 11:31:20.991239 zmc_m1[12029].DB5-zm_zone.cpp/918 [Parsing polygon 0,0 319,0 319,239 0,239]
03/27/09 11:31:20.991251 zmc_m1[12029].DB3-zm_zone.cpp/758 [Parsing polygon string '0,0 319,0 319,239 0,239']
03/27/09 11:31:20.991263 zmc_m1[12029].DB3-zm_zone.cpp/796 [Got coordinate 0,0 from polygon string]
03/27/09 11:31:20.991274 zmc_m1[12029].DB3-zm_zone.cpp/796 [Got coordinate 319,0 from polygon string]
03/27/09 11:31:20.991284 zmc_m1[12029].DB3-zm_zone.cpp/796 [Got coordinate 319,239 from polygon string]
03/27/09 11:31:20.991294 zmc_m1[12029].DB3-zm_zone.cpp/796 [Got coordinate 0,239 from polygon string]
03/27/09 11:31:20.991309 zmc_m1[12029].DB3-zm_zone.cpp/816 [Successfully parsed polygon string]
03/27/09 11:31:20.991322 zmc_m1[12029].DB1-zm_zone.cpp/50 [Initialised zone 1/All - 1 - 320x240 - Rgb:ff0000, 
CM:3, MnAT:25, MxAT:0, MnAP:2300, MxAP:57600, FB:3x3, MnFP:2300, MxFP:57600, MnBS:1500, MxBS:0, MnB:1, MxB:0, 
OF: 0]
03/27/09 11:31:20.993340 zmc_m1[12029].DB1-zm_monitor.cpp/2457 [Loaded monitor 1(DSC-2102), 1 zones]
03/27/09 11:31:20.993364 zmc_m1[12029].INF-zmc.cpp/186 [Starting Capture]
03/27/09 11:31:20.993518 zmc_m1[12029].DB2-zm_remote_camera_rtsp.cpp/112 [Waiting for sources]
03/27/09 11:31:26.007184 zmc_m1[12029].FAT-zm_remote_camera_rtsp.cpp/118 [No RTSP sources]
03/27/09 11:31:26.007689 zmc_m1[12029].INF-zm_signal.cpp/64 [Got signal 6 (Aborted), exiting and forcing backt
race]
03/27/09 11:31:26.007822 zmc_m1[12029].ERR-zm_signal.cpp/84 [Signal address is (nil), from 0xb80b7430]
03/27/09 11:31:26.008478 zmc_m1[12029].ERR-zm_signal.cpp/122 [Backtrace: [0xb80b7430]]
03/27/09 11:31:26.008551 zmc_m1[12029].ERR-zm_signal.cpp/122 [Backtrace: [0xb80b7430]]
03/27/09 11:31:26.008579 zmc_m1[12029].ERR-zm_signal.cpp/122 [Backtrace: /lib/tls/i686/cmov/libc.so.6(gsignal+
0x50) [0xb72948a0]]
03/27/09 11:31:26.008602 zmc_m1[12029].ERR-zm_signal.cpp/122 [Backtrace: /lib/tls/i686/cmov/libc.so.6(abort+0x
188) [0xb7296268]]
03/27/09 11:31:26.008625 zmc_m1[12029].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x805625d]]
03/27/09 11:31:26.008648 zmc_m1[12029].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x807f9a4]]
03/27/09 11:31:26.008672 zmc_m1[12029].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x804d023]]
03/27/09 11:31:26.008694 zmc_m1[12029].ERR-zm_signal.cpp/122 [Backtrace: /lib/tls/i686/cmov/libc.so.6(__libc_s
tart_main+0xe5) [0xb727f685]]
03/27/09 11:31:26.008716 zmc_m1[12029].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x804cbb1]]
03/27/09 11:31:26.008738 zmc_m1[12029].INF-zm_signal.cpp/125 [Backtrace complete, please execute the following
 command for more information]
03/27/09 11:31:26.008760 zmc_m1[12029].INF-zm_signal.cpp/126 [addr2line -e /usr/local/bin/zmc 0xb80b7430 0xb80
b7430 0xb72948a0 0xb7296268 0x805625d 0x807f9a4 0x804d023 0xb727f685 0x804cbb1]
ffmpeg can't recognise rtsp source.
Maybe camera output is just not supported by ffmpeg?
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

One other thing to check is that your don't have a firewall running on your ZM box that is preventing your cam from connecting back into ZM.

That is the nature of RTP etc in that you tell your cam what ports to connect back to ZM on and then the cam send the stream back via UDP. If you have a firewall on then you need to make sure that the range in Options->Network (I think) is permitted through or your's cams IP address is.
Phil
wonderfulll
Posts: 5
Joined: Tue Mar 24, 2009 3:33 pm

Post by wonderfulll »

my UDP ports on switch were closed, after opening them i still dont see the image and as i see there is no errors

Code: Select all

03/27/09 16:19:31.818421 zms[11920].INF-zm_debug.c/292 [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.11920]
03/27/09 16:19:31.818597 zms[11920].DB1-zms.cpp/92 [Query: mode=jpeg&monitor=1&scale=100&maxfps=5&buffer=1000&connkey=219071&ran
d=1238163571]
03/27/09 16:19:31.819145 zms[11920].DB1-zm_monitor.cpp/2260 [Got 1 monitors]
03/27/09 16:19:31.821385 zms[11920].DB1-zm_monitor.cpp/338 [monitor purpose=0]
03/27/09 16:19:31.821435 zms[11920].DB1-zm_monitor.cpp/345 [mem.size=36865192]
03/27/09 16:19:31.821602 zms[11920].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 640x480 - 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]
03/27/09 16:19:31.838715 zms[11920].DB1-zm_monitor.cpp/458 [Monitor DSC-2102 has function 2]
03/27/09 16:19:31.838753 zms[11920].DB1-zm_monitor.cpp/459 [Monitor DSC-2102 LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
03/27/09 16:19:31.838765 zms[11920].DB1-zm_monitor.cpp/460 [Monitor DSC-2102 IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FR
I = 1000, RBP = 7, FM = 0]
03/27/09 16:19:31.838788 zms[11920].DB1-zm_monitor.cpp/2457 [Loaded monitor 1(DSC-2102), 0 zones]
03/27/09 16:19:31.838904 zms[11920].DB3-zm_stream.cpp/58 [FPS:0.00, MXFPS:5, BFPS:0, EFPS:0, FM:1]
03/27/09 16:19:31.838940 zms[11920].DB3-zm_stream.cpp/65 [aEFPS:0, aFM:1]
03/27/09 16:19:31.864101 zms[11920].DB2-zm_monitor.cpp/3342 [Checking swap image location]
03/27/09 16:19:31.864136 zms[11920].DB3-zm_monitor.cpp/3343 [Checking swap image path]
03/27/09 16:19:31.864202 zms[11920].DB3-zm_monitor.cpp/2866 [Swap path '/tmp/zmswap-m1/zmswap-q219071' missing, creating]
03/27/09 16:19:31.864284 zms[11920].DB2-zm_monitor.cpp/3364 [Assigning temporary buffer]
03/27/09 16:19:31.869015 zms[11920].DB2-zm_monitor.cpp/3367 [Assigned temporary buffer]
03/27/09 16:19:34.369488 zms[11920].DB2-zm_monitor.cpp/2917 [Got message, type 1, msg 99]
03/27/09 16:19:34.369524 zms[11920].DB1-zm_monitor.cpp/3123 [Got QUERY command, sending STATUS]
03/27/09 16:19:34.369536 zms[11920].DB2-zm_monitor.cpp/3171 [L:0, D:0, P:0, R:100, d:1238163574.369, Z:100, E:1 F:0]
03/27/09 16:19:34.369587 zms[11920].DB3-zm_stream.cpp/58 [FPS:0.00, MXFPS:5, BFPS:0, EFPS:0, FM:1]
03/27/09 16:19:34.369604 zms[11920].DB3-zm_stream.cpp/65 [aEFPS:0, aFM:1]
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

This last bit here is zms the stream server in ZM, I believe you wanted to look at zmc the capture process.
wonderfulll
Posts: 5
Joined: Tue Mar 24, 2009 3:33 pm

Post by wonderfulll »

did full reinstall of the system (Windows 7 host, VirtualBox guest with host interface), without previous mistakes, but still getting the same error as in the beginning

messages

Code: Select all

Apr  1 07:45:57 zoneminder zmc_m1[6553]: INF [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.06553]
Apr  1 07:45:58 zoneminder zms[6320]: INF [Got signal 15 (Terminated), exiting]
An't find process with command of 'zma -m 1'pr  1 07:45:58 zoneminder zms[6320]: WAR [Unable to store frame as shared memory invalid]
Apr  1 07:45:58 zoneminder zmdc[4236]: WAR [Can't find process with command of 'zma -m 1']
Apr  1 07:45:59 zoneminder zmc_m1[6553]: INF [Starting Capture]
Apr  1 07:46:30 zoneminder zms[6569]: INF [Debug Level = 0, Debug Log = <none>]
Apr  1 07:46:30 zoneminder zms[6569]: INF [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.06569]
zm_debug

Code: Select all

04/01/09 07:46:30.882816 zms[6569].INF-zm_debug.c/292 [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.06569]
04/01/09 07:46:30.885279 zms[6569].DB1-zms.cpp/92 [Query: mode=jpeg&monitor=1&scale=100&maxfps=5&buffer=1000&connkey=871356&rand=1238586390]
04/01/09 07:46:30.897082 zms[6569].DB1-zm_monitor.cpp/2260 [Got 1 monitors]
04/01/09 07:46:30.940062 zms[6569].DB1-zm_monitor.cpp/338 [monitor purpose=0]
04/01/09 07:46:30.940613 zms[6569].DB1-zm_monitor.cpp/345 [mem.size=36865192]
04/01/09 07:46:30.942616 zms[6569].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 640x480 - 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]
04/01/09 07:46:30.961406 zms[6569].DB1-zm_monitor.cpp/458 [Monitor Monitor-1 has function 2]
04/01/09 07:46:30.961470 zms[6569].DB1-zm_monitor.cpp/459 [Monitor Monitor-1 LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
04/01/09 07:46:30.961496 zms[6569].DB1-zm_monitor.cpp/460 [Monitor Monitor-1 IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
04/01/09 07:46:30.961541 zms[6569].DB1-zm_monitor.cpp/2457 [Loaded monitor 1(Monitor-1), 0 zones]
04/01/09 07:46:30.962154 zms[6569].DB3-zm_stream.cpp/58 [FPS:0.00, MXFPS:5, BFPS:0, EFPS:0, FM:1]
04/01/09 07:46:30.962302 zms[6569].DB3-zm_stream.cpp/65 [aEFPS:0, aFM:1]
04/01/09 07:46:30.963006 zms[6569].DB2-zm_monitor.cpp/3342 [Checking swap image location]
04/01/09 07:46:30.963059 zms[6569].DB3-zm_monitor.cpp/3343 [Checking swap image path]
04/01/09 07:46:30.963873 zms[6569].DB3-zm_monitor.cpp/2866 [Swap path '/tmp/zmswap-m1/zmswap-q871356' missing, creating]
04/01/09 07:46:30.965080 zms[6569].DB2-zm_monitor.cpp/3364 [Assigning temporary buffer]
04/01/09 07:46:31.003807 zms[6569].DB2-zm_monitor.cpp/3367 [Assigned temporary buffer]
04/01/09 07:46:33.005972 zms[6569].DB2-zm_monitor.cpp/2917 [Got message, type 1, msg 99]
04/01/09 07:46:33.006027 zms[6569].DB1-zm_monitor.cpp/3123 [Got QUERY command, sending STATUS]
04/01/09 07:46:33.006160 zms[6569].DB2-zm_monitor.cpp/3171 [L:0, D:0, P:0, R:100, d:1238586393.006, Z:100, E:1 F:0]
ports are opened
netstat -a

Code: Select all

...
tcp        0      0 192.168.1.131:54351     192.168.1.124:rtsp      ESTABLISHED
tcp        0      0 192.168.1.131:54350     192.168.1.124:rtsp      ESTABLISHED
...
Locked