Page 1 of 1

ZM droppes Camera

Posted: Fri Jul 05, 2019 6:33 pm
by markush
Hi,

i recently setup a new vide station with ZM. I have used the instructions "Ubuntu 18.04 Easy Way". I have two cameras, Foscam 9900EP and a 9961 EP. Most times only one camera is working, sometimes both cameras unavailable and marked red and very rarely both working:
zm1.JPG
zm1.JPG (22.9 KiB) Viewed 6441 times
The logfile says:
2019-07-05 20:23:01 zma_m2 3291 ERR Shared data not initialised by capture daemon for monitor Parkplatz-1 zm_monitor.cpp 477
2019-07-05 20:23:01 zmdc 2375 ERR 'zma -m 2' exited abnormally, exit status 255 zmdc.pl
2019-07-05 20:22:57 zmdc 2375 ERR 'zma -m 2' exited abnormally, exit status 255 zmdc.pl
2019-07-05 20:22:57 zma_m2 3283 ERR Shared data not initialised by capture daemon for monitor Parkplatz-1 zm_monitor.cpp 477
2019-07-05 20:22:52 zma_m2 3282 ERR Shared data not initialised by capture daemon for monitor Parkplatz-1 zm_monitor.cpp 477
2019-07-05 20:22:52 zmdc 2375 ERR 'zma -m 2' exited abnormally, exit status 255 zmdc.pl
2019-07-05 20:22:50 zma_m2 3278 ERR Shared data not initialised by capture daemon for monitor Parkplatz-1 zm_monitor.cpp 477
2019-07-05 20:22:50 zmdc 2375 ERR 'zma -m 2' exited abnormally, exit status 255 zmdc.pl
2019-07-05 20:22:46 zmdc 2375 ERR 'zma -m 2' exited abnormally, exit status 255 zmdc.pl
2019-07-05 20:22:46 zma_m2 3271 ERR Shared data not initialised by capture daemon for monitor Parkplatz-1 zm_monitor.cpp 477
2019-07-05 20:22:41 zma_m2 3270 ERR Shared data not initialised by capture daemon for monitor Parkplatz-1 zm_monitor.cpp 477
2019-07-05 20:22:41 zmdc 2375 ERR 'zma -m 2' exited abnormally, exit status 255 zmdc.pl
2019-07-05 20:22:40 zmwatch 2437 ERR Memory map file '/dev/shm/zm.mmap.2' should have been 1160 but was instead 0 zmwatch.pl
2019-07-05 20:22:40 zma_m2 3269 ERR Shared data not initialised by capture daemon for monitor Parkplatz-1 zm_monitor.cpp 477
2019-07-05 20:22:40 zmdc 2375 ERR 'zma -m 2' exited abnormally, exit status 255 zmdc.pl
2019-07-05 20:22:36 zmdc 2375 ERR 'zma -m 2' exited abnormally, exit status 255 zmdc.pl
There is a 128GB SSD with the OS and 4TB HDD for Videofiles. There are 4 GB RAm Memory.

df -h /dev/shm/
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
tmpfs 2,7G 633M 2,1G 24% /dev/shm


I'm totally confused :? Any hints for me?

Re: ZM droppes Camera

Posted: Fri Jul 05, 2019 8:35 pm
by bbunge
Check the amount of tmpfs used. Also known as /dev/shm High camera resolution can use up a lot of RAM. Lower the camera resolution on both cameras.

Re: ZM droppes Camera

Posted: Sat Jul 06, 2019 10:59 am
by markush
df -h /dev/shm/
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
tmpfs 2,7G 633M 2,1G 24% /dev/shm
Should be enough, isn't it?

Re: ZM droppes Camera

Posted: Sat Jul 06, 2019 2:25 pm
by rockedge
that looks okay as far as RAM...I have run into what you describe also before...I will look into my notes to see if I have a tip.

I feel like this is a permissions problem...... first thing to test please lower the camera resolution to something like 640x480 to see how the 2 cams run at this point

Re: ZM droppes Camera

Posted: Sun Jul 07, 2019 2:42 pm
by markush
I feel like this is a permissions problem...... first thing to test please lower the camera resolution to something like 640x480 to see how the 2 cams run at this point
But sometimes both cams works well?!?

Have you looked up your notes?

Thanks!

Re: ZM droppes Camera

Posted: Sun Jul 07, 2019 2:59 pm
by markush
My Network Configuration:

1 separate Networkcard for the cameras
172.16.0.240/16 - static ip

and 1 Network Card connected to the Network.
dhcp

Could this lead into the problems? A ping - command shows every time correct answers!

@rockedge: Changed resolution to 640x480, unfortunately no improvment :|

Re: ZM droppes Camera

Posted: Mon Jul 08, 2019 2:49 am
by bbunge
Still looks like a tmpfs issue.
What Linux distro and version?
How are you mounting the 4 TB drive?

Re: ZM droppes Camera

Posted: Mon Jul 08, 2019 8:42 pm
by markush
I'm using Ubuntu Linux Server Image, version 18.04.

Mounting of the 4 TB HDD (via /etc/fstab):
/dev/sda1 /video ext4 defaults,noatime 0 0

Re: ZM droppes Camera

Posted: Mon Jul 08, 2019 11:06 pm
by bbunge
You are better off using systemd to mount the drive. See
https://wiki.zoneminder.com/Common_Issu ... ive_or_NAS
With systemd you can hold the zoneminder start until the drive is mounted and the database server is running.

I have used an abbreviated version of this procedure to mount a second drive to /mnt/sdb1 and change the storage in Zoneminder to this location (/mnt/sdb1/zoneminder/events). viewtopic.php?f=38&t=28396

Re: ZM droppes Camera

Posted: Sun Jul 14, 2019 6:26 pm
by markush
Activitaded debug logging:

Code: Select all

07/14/19 18:40:57.753873 zmc_m1[3564].DB9-zm_image.cpp/2397 [Deleting active_edge]
07/14/19 18:40:57.753877 zmc_m1[3564].DB9-zm_image.cpp/2397 [Deleting active_edge]
07/14/19 18:40:57.756910 zmc_m1[3564].DB1-zm_monitor.cpp/2322 [Loaded monitor 1(Haupteingang), 1 zones]
07/14/19 18:40:57.756926 zmc_m1[3564].INF-zmc.cpp/223 [Starting Capture version 1.32.3]
07/14/19 18:40:57.765540 zmc_m1[3564].INF-zm_ffmpeg_camera.cpp/163 [Priming capture from rtsp://**.**@172.16.0.10:88/videoMain]
07/14/19 18:40:57.782139 zmc_m1[3564].DB1-zm_ffmpeg_camera.cpp/344 [Calling avformat_open_input for rtsp://videoup:Videoup1@172.16.0.10:88/videoMain]
07/14/19 18:40:57.824288 zmc_m1[3564].DB1-zm_ffmpeg_camera.cpp/376 [Opened input]
07/14/19 18:40:57.824323 zmc_m1[3564].INF-zm_ffmpeg_camera.cpp/378 [Stream open rtsp://**.**@172.16.0.10:88/videoMain, parsing streams...]
07/14/19 18:40:57.829553 zmc_m1[3564].DB4-zm_ffmpeg_camera.cpp/384 [Calling avformat_find_stream_info]
07/14/19 18:41:03.001301 zmc_m1[3564].DB4-zm_ffmpeg_camera.cpp/393 [Got stream info]
07/14/19 18:41:03.001321 zmc_m1[3564].DB3-zm_ffmpeg_camera.cpp/438 [Found video stream at index 0]
07/14/19 18:41:03.001328 zmc_m1[3564].DB3-zm_ffmpeg_camera.cpp/439 [Found audio stream at index 1]
07/14/19 18:41:03.001402 zmc_m1[3564].DB1-zm_ffmpeg_camera.cpp/503 [Failed to find decoder (h264_mmal)]
07/14/19 18:41:03.001412 zmc_m1[3564].DB1-zm_ffmpeg_camera.cpp/514 [Video Found decoder h264]
07/14/19 18:41:03.001418 zmc_m1[3564].DB1-zm_ffmpeg.cpp/267 [Dumping stream index i(0) index(0)]
07/14/19 18:41:03.001424 zmc_m1[3564].DB1-zm_ffmpeg.cpp/272 [    Stream #0:0]
07/14/19 18:41:03.001430 zmc_m1[3564].DB1-zm_ffmpeg.cpp/280 [, frames:0, timebase: 1/90000]
07/14/19 18:41:03.001437 zmc_m1[3564].DB1-zm_ffmpeg.cpp/282 [: Video: h264, none]
07/14/19 18:41:03.001443 zmc_m1[3564].DB3-zm_ffmpeg.cpp/307 [
]
07/14/19 18:41:03.001449 zmc_m1[3564].DB1-zm_ffmpeg.cpp/229 [90k stream tb numerator , ]
07/14/19 18:41:03.001458 zmc_m1[3564].DB1-zm_ffmpeg.cpp/229 [180k codec time base:]
07/14/19 18:41:03.001465 zmc_m1[3564].DB1-zm_ffmpeg.cpp/337 [
]
07/14/19 18:41:03.001470 zmc_m1[3564].DB1-zm_ffmpeg_camera.cpp/521 [Calling avcodec_open2]
07/14/19 18:41:03.001589 zmc_m1[3564].DB1-zm_ffmpeg_camera.cpp/544 [HWACCEL not in use]
07/14/19 18:41:03.001610 zmc_m1[3564].DB1-zm_ffmpeg_camera.cpp/556 [Audio Found decoder]
07/14/19 18:41:03.001617 zmc_m1[3564].DB1-zm_ffmpeg.cpp/267 [Dumping stream index i(1) index(0)]
07/14/19 18:41:03.001627 zmc_m1[3564].DB1-zm_ffmpeg.cpp/272 [    Stream #0:1]
07/14/19 18:41:03.001633 zmc_m1[3564].DB1-zm_ffmpeg.cpp/280 [, frames:86, timebase: 1/8000]
07/14/19 18:41:03.001642 zmc_m1[3564].DB1-zm_ffmpeg.cpp/282 [: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s]
07/14/19 18:41:03.001648 zmc_m1[3564].DB1-zm_ffmpeg.cpp/337 [
]
07/14/19 18:41:03.001653 zmc_m1[3564].DB1-zm_ffmpeg_camera.cpp/563 [Calling avcodec_open2]
07/14/19 18:41:03.001663 zmc_m1[3564].DB2-zm_ffmpeg_camera.cpp/569 [Opened audio codec]
07/14/19 18:41:03.001670 zmc_m1[3564].DB3-zm_ffmpeg_camera.cpp/584 [Allocated frames]
07/14/19 18:41:03.001677 zmc_m1[3564].DB4-zm_ffmpeg_camera.cpp/597 [Validated imagesize]
07/14/19 18:41:03.001682 zmc_m1[3564].DB1-zm_ffmpeg_camera.cpp/600 [Calling sws_isSupportedInput]
07/14/19 18:41:03.001692 zmc_m1[3564].ERR-zm_ffmpeg_camera.cpp/602 [swscale does not support the codec format: ÿÿÿÿ]
07/14/19 18:41:03.007697 zmc_m1[3564].ERR-zmc.cpp/253 [Failed to prime capture of initial monitor]
07/14/19 18:41:08.045425 zmc_m1[3564].INF-zm_signal.cpp/40 [Got signal 15 (Terminated), exiting]
07/14/19 18:41:08.053353 zmc_m1[3564].DB2-zm_ffmpeg_camera.cpp/637 [CloseFfmpeg called.]
07/14/19 18:41:08.097887 zmc_m1[3564].DB1-zm_logger.cpp/255 [Terminating Logger]