Clean installation on Ubuntu 18.04 - Cameras not working

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
Jerubei
Posts: 6
Joined: Wed Mar 02, 2016 9:56 pm

Clean installation on Ubuntu 18.04 - Cameras not working

Post by Jerubei »

Hello, guys,

I've just installed 18.04 and Zoneminder 1.32 using the first script on this page:

https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

As far as I can tell, everything went smoothly. Then I used the camera configurations from my old ZM install, but all three cameras (two models in total) are not working. The logs show the following after I try to view one of the cameras:

Code: Select all

019-12-29 16:33:43	zmwatch		17506	ERR	Memory map file '/dev/shm/zm.mmap.1' should have been 1160 but was instead 0	zmwatch.pl	
2019-12-29 16:33:38	web_php		2178	ERR	Socket /var/run/zm/zms-923328s.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.	/usr/share/zoneminder/www/includes/functions.php	2048
2019-12-29 16:33:38	zms_m1		17572	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?	zm_monitor.cpp	538
2019-12-29 16:33:38	zms_m1		17572	ERR	Unable to connect to monitor id 1 for streaming	zm_stream.cpp	48
2019-12-29 16:33:38	zms_m1		17572	ERR	Unable to connect to zmc process for monitor 1	zms.cpp	254
2019-12-29 16:33:37	zms_m1		17568	ERR	Unable to connect to zmc process for monitor 1	zms.cpp	254
2019-12-29 16:33:37	zms_m1		17568	ERR	Unable to connect to monitor id 1 for streaming	zm_stream.cpp	48
2019-12-29 16:33:37	zms_m1		17568	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?	zm_monitor.cpp	538
2019-12-29 16:33:35	zms_m1		17567	ERR	Unable to connect to zmc process for monitor 1	zms.cpp	254
2019-12-29 16:33:35	zms_m1		17567	ERR	Unable to connect to monitor id 1 for streaming	zm_stream.cpp	48
2019-12-29 16:33:35	zms_m1		17567	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?	zm_monitor.cpp	538
2019-12-29 16:33:35	web_php		12696	ERR	Socket /var/run/zm/zms-809038s.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.	/usr/share/zoneminder/www/includes/functions.php	2048
2019-12-29 16:33:34	zms_m1		17563	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?	zm_monitor.cpp	538
2019-12-29 16:33:34	zms_m1		17563	ERR	Unable to connect to monitor id 1 for streaming	zm_stream.cpp	48
2019-12-29 16:33:34	zms_m1		17563	ERR	Unable to connect to zmc process for monitor 1	zms.cpp	254
2019-12-29 16:33:33	web_php		15524	ERR	Socket /var/run/zm/zms-278258s.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.	/usr/share/zoneminder/www/includes/functions.php	2048
2019-12-29 16:33:33	zmwatch		17506	ERR	Memory map file '/dev/shm/zm.mmap.1' should have been 1160 but was instead 0	zmwatch.pl	
2019-12-29 16:33:33	zmwatch		17506	INF	Restarting capture daemon for Cafe-In, shared data not valid	zmwatch.pl	
2019-12-29 16:33:33	zmdc		17455	INF	Command 'zmc -m 1' removed from pending list at 19/12/29 16:33:33	zmdc.pl	
2019-12-29 16:33:33	zms_m1		17562	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?	zm_monitor.cpp	538
2019-12-29 16:33:33	zms_m1		17562	ERR	Unable to connect to monitor id 1 for streaming	zm_stream.cpp	48
2019-12-29 16:33:33	zms_m1		17562	ERR	Unable to connect to zmc process for monitor 1	zms.cpp	254
2019-12-29 16:33:32	zms_m1		17556	ERR	Unable to connect to zmc process for monitor 1	zms.cpp	254
2019-12-29 16:33:32	zms_m1		17556	ERR	Unable to connect to monitor id 1 for streaming	zm_stream.cpp	48
2019-12-29 16:33:32	zms_m1		17556	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?	zm_monitor.cpp	538
2019-12-29 16:33:31	zms_m1		17554	ERR	Unable to connect to zmc process for monitor 1	zms.cpp	254
2019-12-29 16:33:31	zms_m1		17554	ERR	Unable to connect to monitor id 1 for streaming	zm_stream.cpp	48
2019-12-29 16:33:31	zms_m1		17554	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?	zm_monitor.cpp	538
2019-12-29 16:33:31	web_php		12696	ERR	Socket /var/run/zm/zms-628397s.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.	/usr/share/zoneminder/www/includes/functions.php	2048
2019-12-29 16:33:30	zms_m1		17550	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?	zm_monitor.cpp	538
2019-12-29 16:33:30	zms_m1		17550	ERR	Unable to connect to monitor id 1 for streaming	zm_stream.cpp	48
2019-12-29 16:33:30	zms_m1		17550	ERR	Unable to connect to zmc process for monitor 1	zms.cpp	254
2019-12-29 16:33:29	web_php		12696	ERR	Socket /var/run/zm/zms-450232s.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.	/usr/share/zoneminder/www/includes/functions.php	2048
2019-12-29 16:33:29	zms_m1		17549	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?	zm_monitor.cpp	538
2019-12-29 16:33:29	zms_m1		17549	ERR	Unable to connect to monitor id 1 for streaming	zm_stream.cpp	48
2019-12-29 16:33:29	zms_m1		17549	ERR	Unable to connect to zmc process for monitor 1	zms.cpp	254
2019-12-29 16:33:27	zms_m1		17545	ERR	Unable to connect to zmc process for monitor 1	zms.cpp	254
2019-12-29 16:33:27	zms_m1		17545	ERR	Unable to connect to monitor id 1 for streaming	zm_stream.cpp	48
2019-12-29 16:33:27	zms_m1		17545	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?	zm_monitor.cpp	538
2019-12-29 16:33:27	zms_m1		17544	ERR	Unable to connect to zmc process for monitor 1	zms.cpp	254
2019-12-29 16:33:27	zms_m1		17544	ERR	Unable to connect to monitor id 1 for streaming	zm_stream.cpp	48
2019-12-29 16:33:27	zms_m1		17544	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?	zm_monitor.cpp	538
2019-12-29 16:33:27	web_php		1501	ERR	Socket /var/run/zm/zms-752322s.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.	/usr/share/zoneminder/www/includes/functions.php	2048
2019-12-29 16:33:26	zms_m1		17540	ERR	Got empty memory map file size 0, is the zmc process for this monitor running?	zm_monitor.cpp	538
2019-12-29 16:33:26	zms_m1		17540	ERR	Unable to connect to monitor id 1 for streaming	zm_stream.cpp	48
2019-12-29 16:33:26	zms_m1		17540	ERR	Unable to connect to zmc process for monitor 1	zms.cpp	254
2019-12-29 16:33:24	zmdc		17455	INF	'zmc -m 1' exited normally	zmdc.pl	
2019-12-29 16:33:23	zmc_m1		17531	INF	Got signal 15 (Terminated), exiting	zm_signal.cpp	40
2019-12-29 16:33:23	zmdc		17455	INF	'zmc -m 1' sending stop to pid 17531 at 19/12/29 16:33:23	zmdc.pl	
2019-12-29 16:33:23	zmwatch		17506	INF	Restarting capture daemon for Cafe-In, no image since startup. Startup time was 1577629989 - now 1577630003 > 5
I'm using Firefox, so cambozola shouldn't be needed, nph-zms is set at the same path as my old zoneminder install... The only thing I can think of is that I've not setup CGI in apache, since this is a new install, which I'm not sure how to do - any links or help is much appreciated!
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Clean installation on Ubuntu 18.04 - Cameras not working

Post by bbunge »

Did you start with a fresh Ubuntu install?
Did you reuse the database from the old ZM setup?
The Zoneminder package enables cgi in Apache2 and the script reliably sets up Zoneminder to work. Look to something you missed in the cam config.
Jerubei
Posts: 6
Joined: Wed Mar 02, 2016 9:56 pm

Re: Clean installation on Ubuntu 18.04 - Cameras not working

Post by Jerubei »

Thank you for your reply!

Clean install of Ubuntu 18.04 - the only specific thing is it's on RAID1, which shouldn't matter.

Clean install of ZoneMinder using the script, which I've linked.

I've not reused anything from the old installation, except manually entering the camera configurations. Cameras work in VLC, but not in ZM.

As you can see from the logs, I get two errors - about shm not allocating memory and cgi not working.

What should I check?
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Clean installation on Ubuntu 18.04 - Cameras not working

Post by bbunge »

Check your timezone. The script uses info in /etc/timezone to append a line to /etc/php/7.2/apache2/php.ini. In 1.32.x if the PHP timezone setting is not right you can have issues.

Camera resolution in Zoneminder does not match camera output. Use VLC (Tools, Media Information, Codec) to check camera Display Resolution. Do not assume the camera specification resolution will work!

When I install Ubuntu I use the mini.iso and a network installer with a very minimum OS. No desktop. No basic server. You will have to use Legacy boot but you will have an operating system that runs without other apps using resources.

I would encourage you to use the development version in the zoneminder-master PPA. Much work has been done on it and it runs smoother than 1.32.x. Easy enough to modify the install script and you do not need to modify php.ini for timezone as this setting is now in ZM options.
Jerubei
Posts: 6
Joined: Wed Mar 02, 2016 9:56 pm

Re: Clean installation on Ubuntu 18.04 - Cameras not working

Post by Jerubei »

Purged 1.32, including the database, reinstalled from Master PPA, seems to be working now.

One more question - does ZM still need fstab entries for saving to a mounted drive or can this be achieved otherwise with 1.33?

Thank you for all the help!
Post Reply