only 1 camera work at time on raspbian buster

Forum for questions and support relating to 1.33.x development only.
Post Reply
cesp
Posts: 2
Joined: Sun Sep 22, 2019 11:40 pm

only 1 camera work at time on raspbian buster

Post by cesp » Mon Sep 23, 2019 12:10 am

Hi, i need help with this:

only 1 camera work at time on raspbian buster installed on raspberry pi 4/4Gb (ZM v1.33.14)

the following errors are shown in the log:

2019-09-22 17:49:17 zmwatch 2162 ERR Memory map file '/dev/shm/zm.mmap.1' should have been 1160 but was instead 0 zmwatch.pl
2019-09-22 17:49:13 zmdc 2070 ERR 'zma -m 1' exited abnormally, exit status 255 zmdc.pl
2019-09-22 17:49:13 zma_m1 2388 ERR Got empty memory map file size 0, is the zmc process for this monitor running?

and there is enough memory to run it:

root@ZMRPI4:/home/pi# df -h /dev/shm
Filesystem Size Used Avail Use% Mounted on
tmpfs 2.0G 132M 1.8G 7% /dev/shm
root@ZMRPI4:/home/pi#
root@ZMRPI4:/home/pi# ls -lrt /dev/shm
total 270016
-rw------- 1 www-data www-data 138245744 Sep 22 17:46 zm.mmap.2
-rw------- 1 www-data www-data 138245744 Sep 22 17:48 zm.mmap.1
root@ZMRPI4:/home/pi#

what can i do??

User avatar
snake
Posts: 249
Joined: Sat May 21, 2016 2:20 am

Re: only 1 camera work at time on raspbian buster

Post by snake » Mon Sep 23, 2019 4:57 pm

Try lowering the FPS at the camera, the resolution, and / or use record instead of Mocord or Modect so that no analysis is done. You can also disable all logging on ZM (Options - Logging), and anything else that might use up CPU. Reference: https://wiki.zoneminder.com/Single_Board_Computers

You will also want to consider which mode you are using on the camera, whether it is encode, passthrough, or JPEG saving. Passthrough or JPEG saving (not both, because this is ARM) is a good start. Reference: https://zoneminder.readthedocs.io/en/1. ... torage-tab
Last edited by snake on Mon Sep 23, 2019 5:01 pm, edited 2 times in total.

mikb
Posts: 415
Joined: Mon Mar 25, 2013 12:34 pm

Re: only 1 camera work at time on raspbian buster

Post by mikb » Mon Sep 23, 2019 4:59 pm

Am I being thick here, or is there a discrepancy between these reports :-

Code: Select all

tmpfs 2.0G *132M* 1.8G 7% /dev/shm

Code: Select all

total *270016*
-rw------- 1 www-data www-data 138245744 Sep 22 17:46 zm.mmap.2
-rw------- 1 www-data www-data 138245744 Sep 22 17:48 zm.mmap.1
It seems like the df "usage" indicates one the the zm maps isn't there after all ... (132M vs 270M)

User avatar
snake
Posts: 249
Joined: Sat May 21, 2016 2:20 am

Re: only 1 camera work at time on raspbian buster

Post by snake » Mon Sep 23, 2019 5:08 pm

mikb wrote:
Mon Sep 23, 2019 4:59 pm
It seems like the df "usage" indicates one the the zm maps isn't there after all ... (132M vs 270M)
I'm going to guess ZM is trying to initialize the mmap, and then is unable to keep up with the camera feed, at which point it balks, and the mmap is constantly being re-made. He might've just caught the df output when it was inbetween. I will admit I'm not familiar with the code for this aspect so I could be off base, but when I've gotten this error on RPI before, it was due to too high of a resolution or FPS. The CPU can't keep up.

What are the cameras resolution and FPS? What make/model of camera?

cesp
Posts: 2
Joined: Sun Sep 22, 2019 11:40 pm

Re: only 1 camera work at time on raspbian buster

Post by cesp » Wed Sep 25, 2019 4:47 pm

2 Hosafe cameras, 1280x720 /24 bits color / 10 fps configured on the cameras
those 2 cameras work good in a previous ZM version (1.29) running on a RPi 3b, so why not in pi4/raspbian buster
i already made a complete OS and ZM reinstall (4 times ) following different guides but i get same issue: just 1 camera at time can work on ZM 1.33/RPi4

bbunge
Posts: 2445
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: only 1 camera work at time on raspbian buster

Post by bbunge » Fri Sep 27, 2019 12:02 am

Try Ubuntu, 18.04, armhf or arm64. Then use the iconnor ppa. I have had two cams running on a pi 3b÷
I have had no success with Debian and Zm on a pi.

bodgit
Posts: 4
Joined: Sat Sep 28, 2019 12:38 pm
Location: St Lucia West Indies

Re: only 1 camera work at time on raspbian buster

Post by bodgit » Sat Sep 28, 2019 12:44 pm

I also have been trying for a few days to get 1.33 working on a raspberry pi 4/4, with raspian lite,problems, only one camera working etc.

Switched to Ubuntu 18.04 from here https://jamesachambers.com/raspberry-pi ... ion-guide/ and using this guide https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way just changing the repository to master to get 1.33.

I now have a setup that has been running perfectly for the past week with 4 cameras,2 x Wyze v2 and 2 x Trendnet TV-IP751WIC one of which is located at a remote site.

I did find it a bit slugish at first but when i changed to running on a usb sd drive the difference was dramatic. Considering at the moment whether to add another 2 Wvze cameras.

Would rather be running on raspian so hopefully in the future......

User avatar
iconnor
Posts: 849
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: only 1 camera work at time on raspbian buster

Post by iconnor » Sat Sep 28, 2019 10:12 pm

1 camera at a time means you are running out of space in /dev/shm. Reconfigure it to use more ram, or edit the monitor and reduce the # of image buffers.

User avatar
iconnor
Posts: 849
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: only 1 camera work at time on raspbian buster

Post by iconnor » Sat Sep 28, 2019 10:14 pm

One other thing to note is that sometimes you can get into a situation where zm.mmap files have been deleted, but are still held open by one of the daemon scripts. So you actually be using more of /dev/shm that ls will show.

bodgit
Posts: 4
Joined: Sat Sep 28, 2019 12:38 pm
Location: St Lucia West Indies

Re: only 1 camera work at time on raspbian buster

Post by bodgit » Mon Sep 30, 2019 4:19 pm

Thanks for that iconner, although to be honest due to time constraints and how well ubuntu 18.04/zoneminder 1.33.14 is running on the Pie4 I will probable stay on this setup.

The system is regularly backing events up to dropbox with a nightly backup of the DB.

I have also added a 5th camera, raspberry 2 with a USB camera connected, running motioneye os with the camera as a fast network camera. All this running through ZM on a Pie 4/4.

So a big thank you to yourself and every one involved with ZM, not to forget James A Chambers for the Ubuntu image.

Sumfx
Posts: 2
Joined: Sat Oct 19, 2019 7:19 pm

Re: only 1 camera work at time on raspbian buster

Post by Sumfx » Sat Oct 19, 2019 7:37 pm

I am new to this board so I hope this is appropriate. I just set up my rasp pi 4 running buster and have 5 cameras all working. 3 old IP cameras and 2 newer IP onvif running on ZM 1.33. I am not having any issues now however I moved over for RP 3 running 1.30.4 and had a few problems with initial setup. Buster will run ZM 1.33.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest