ZoneMinder 1.30.4 in Arch Linux - troubleshooting ...

Forum for questions and support relating to the 1.30.x releases only.
Locked
jb2017
Posts: 11
Joined: Tue Oct 31, 2017 2:11 pm

ZoneMinder 1.30.4 in Arch Linux - troubleshooting ...

Post by jb2017 »

Hi folks,

I use Arch Linux for all my needs at home and would really like to setup a home security camera system using ZoneMinder running on an Arch Linux VM.
I have created my VM and passed a USB webcam to it from the host system, which is available in the VM as /dev/video0.
I have followed the Arch Wiki page for Zoneminder (https://wiki.archlinux.org/index.php/ZoneMinder) and installed the zoneminder package from the Arch User Repositiry (https://aur.archlinux.org/packages/zoneminder/).
After completing this I've managed to get into the ZoneMinder web interface and add a new "local monitor" using the webcam on /dev/video0 but when I try to view it I just see a blank white box where the image should be, and the video image never appears. Although the blue light on the camera is on ...
The zoneminder log is showing the following issues repeatedly ...

Code: Select all

2017-10-31 14:18:39.318678	web_php		1525	ERR	disk_total_space returned false. Verify the web account user has access to /dev/shm	zoneminder/includes/functions.php	1450
2017-10-31 14:13:45.741420	zms		1534	ERR	Terminating, last frame sent time 1509459225.241306 secs more than maximum of 10.000000	zm_monitor.cpp	4213
2017-10-31 14:13:45.196412	web_js		617	ERR	getStreamCmdResponse stream error: Socket /var/lib/zoneminder/sock/zms-514994s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors()	?view=watch	
2017-10-31 14:13:44.975230	web_php		617	ERR	Socket /var/lib/zoneminder/sock/zms-514994s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information.	zoneminder/includes/functions.php	2033
As far as I can see I have enabled CGI correctly in apache, and the PATH_ZMS variable is set correctly. So I'm at a loss right now.
Can anybody help with this?

Many thanks - Justin
bbunge
Posts: 2944
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: ZoneMinder 1.30.4 in Arch Linux - troubleshooting ...

Post by bbunge »

Did you add a user for video?
jb2017
Posts: 11
Joined: Tue Oct 31, 2017 2:11 pm

Re: ZoneMinder 1.30.4 in Arch Linux - troubleshooting ...

Post by jb2017 »

Yes the http user (user running apache) is in the video group.
bbunge
Posts: 2944
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: ZoneMinder 1.30.4 in Arch Linux - troubleshooting ...

Post by bbunge »

Could be a problem with the USB camera in the VM.

As a test try this camera to see if it works:
use Remote
remote protocol http
remote method simple
remote name host 212.170.22.153
remote host path /mjpg/video.mjpg
capture width 640
capture height 360

If this camera works dump the VM and build a real server.
jb2017
Posts: 11
Joined: Tue Oct 31, 2017 2:11 pm

Re: ZoneMinder 1.30.4 in Arch Linux - troubleshooting ...

Post by jb2017 »

Yes i think the issue is with accessing the camera in the VM. I tried just running Cheese (gnome application for webcams) and this didn't work either. Nor did ffplay. I've managed to get a "Remote" monitor to work now, with the webcam attached to the main host machine again and streaming it to ffserver on the same machine. Then in the zoneminder VM i connect to the ffserver stream coming from the vm host machine - this will do nicely.

Now the only error I'm seeing in the ZM log is

Code: Select all

disk_total_space returned false. Verify the web account user has access to /dev/shm
But that's another issue, and doesn't seem to be affecting the anything else in ZM at the moment.

I'm new to ZM so I have a lot of reading to do with regards to setting it up and managing the events captured by the monitor. All really good stuff though!
akg1508
Posts: 26
Joined: Sun Aug 02, 2015 9:06 am

Re: ZoneMinder 1.30.4 in Arch Linux - troubleshooting ...

Post by akg1508 »

Check that you have enough free space in /dev/shm. I have 6 cameras, and each requires 176M for corresponding zm.mmap.x file.
jb2017
Posts: 11
Joined: Tue Oct 31, 2017 2:11 pm

Re: ZoneMinder 1.30.4 in Arch Linux - troubleshooting ...

Post by jb2017 »

Code: Select all

[justin@zoneminder ~]$ df -h /dev/shm
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           2.0G  120M  1.9G   7% /dev/shm
[justin@zoneminder ~]$
Looks like there is plenty space. Also ...

Code: Select all

[justin@zoneminder ~]$ ls -lha /dev/shm
total 120M
drwxrwxrwt  2 root root   80 Nov  1 11:59 .
drwxr-xr-x 18 root root 3.0K Nov  1 11:59 ..
-rw-------  1 http http  69M Nov  1 11:59 zm.mmap.6
-rw-------  1 http http  52M Nov  1 11:59 zm.mmap.7
[justin@zoneminder ~]$
Looks like http user can write to it.
rockedge
Posts: 1177
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: ZoneMinder 1.30.4 in Arch Linux - troubleshooting ...

Post by rockedge »

I can not get a local webcam to work using 1.30.4 in a VirtualBox machine either. Netcams Okay.
Locked