Debian Buster install procedure for Zoneminder 1.34.x

Forum for questions and support relating to the 1.34.x releases only.
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by lazyleopard »

lbm wrote: Wed Jan 22, 2020 12:06 pm Worked here, upgrading from 1.33.16.
I had to do this though.

Code: Select all

systemctl stop zoneminder
killall /usr/bin/perl
zmupdate.pl
Remove the commend, for "User" under: /lib/systemd/system/zoneminder.service , and reload systemd daemon, else it would throw the following error.:

Code: Select all

Jan 22 12:56:25 zoneminder systemd[1]: zoneminder.service: New main PID 24046 does not belong to service, and PID file is not owned by 
root. Refusing.
Jan 22 12:56:25 zoneminder systemd[1]: zoneminder.service: New main PID 24046 does not belong to service, and PID file is not owned by 
root. Refusing.

Code: Select all

systemctl daemon-reload
systemctl start zoneminder
I just had zoneminder upgrade from an earlier version of 1.34 to 1.34.9 on buster, and had to repeat the steps above because my /lib/systemd/system/zoneminder.service had reverted to the version with the "User" commented out. All working again now, but until I fixed it systemd was trying to restart zoneminder every ten seconds...
Rick Hewett
betelgeuze
Posts: 2
Joined: Sun Apr 12, 2020 4:55 pm

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by betelgeuze »

Hello,
I did a a complete clean install of Zoneminder according to https://wiki.zoneminder.com/Debian_10_B ... .2C_PHP.29 on a clean Raspbian buster (Linux 4.19.97-v7+).

The System is working as intended and records from two cameras. However in the log I have an error which I cannot correct after searching in the wiki and forums.

Code: Select all

Socket /var/run/zm/zms-376805s.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....
Any ideas what could be the reason and how I can fix it?
Thank you
Betel
kx32
Posts: 4
Joined: Sun Apr 12, 2020 7:57 pm

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by kx32 »

I've tried installing Zoneminder but get the message "Mootools not found! Please check that it was installed correctly in Zoneminder web root." Mootools is installed so don't understand the problem.
bbunge
Posts: 2951
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by bbunge »

betelgeuze wrote: Sun Apr 12, 2020 6:17 pm Hello,
I did a a complete clean install of Zoneminder according to https://wiki.zoneminder.com/Debian_10_B ... .2C_PHP.29 on a clean Raspbian buster (Linux 4.19.97-v7+).

The System is working as intended and records from two cameras. However in the log I have an error which I cannot correct after searching in the wiki and forums.

Code: Select all

Socket /var/run/zm/zms-376805s.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....
Any ideas what could be the reason and how I can fix it?
Thank you
Betel
Likely a result of you viewing montage for a long time without refreshing the browser. Does no harm. Turn off logging to database if you do not want to see it.
bbunge
Posts: 2951
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by bbunge »

kx32 wrote: Sun Apr 12, 2020 8:59 pm I've tried installing Zoneminder but get the message "Mootools not found! Please check that it was installed correctly in Zoneminder web root." Mootools is installed so don't understand the problem.
OK, but what are you installing it on? I run this install on a minimal Buster with Mariadb, Apache2 or NGINX and PHP with no errors...
betelgeuze
Posts: 2
Joined: Sun Apr 12, 2020 4:55 pm

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by betelgeuze »

bbunge wrote: Mon Apr 13, 2020 12:54 am Likely a result of you viewing montage for a long time without refreshing the browser. Does no harm. Turn off logging to database if you do not want to see it.
It indeed appears after viewing a single camera or in montage. If it is ok to ignore it, I can live with that.
Thank you.
SkippyDo
Posts: 227
Joined: Mon Nov 20, 2017 6:49 pm

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by SkippyDo »

After being really close to have upgrades working (both to Buster and to ZM 1.34.10) I'm now totally derailed and looking for some direction on how to proceed.

Had some issues with mariadb server (ZM failing to connect- DB updated fine, I was able to look at data directly through mysql) so I removed and reinstalled mariadb. I am now unable to restore the ZM database: streams of "[Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name. Please run mysql_upgrade". Running mysql_upgrade didn't help. Somewhere along the line I've nuked my database root password: I can log in as zmuser OK.

I'm going to stop digging now... (hole isn't getting shallower!).
Thoomas1970
Posts: 1
Joined: Mon May 11, 2020 6:12 am

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by Thoomas1970 »

pgrunwald wrote: Sun Feb 16, 2020 8:40 pm

Code: Select all

 sudo apt install zoneminder
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  fcgiwrap
The following NEW packages will be installed:
  zoneminder
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/6,876 kB of archives.
After this operation, 41.4 MB of additional disk space will be used.
Selecting previously unselected package zoneminder.
(Reading database ... 100809 files and directories currently installed.)
Preparing to unpack .../zoneminder_1.34.2-buster_amd64.deb ...
Unpacking zoneminder (1.34.2-buster) ...
Setting up zoneminder (1.34.2-buster) ...
/var/lib/dpkg/info/zoneminder.postinst: 5: /etc/zm/conf.d/zmcustom.conf: neigh: not found
Detected db service is mariadb.service
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
Creating zm db
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Error creating db.
dpkg: error processing package zoneminder (--configure):
 installed zoneminder package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.8.5-2) ...
Errors were encountered while processing:
 zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)
I get a similar error message when I try to install ZoneMinder 1.34:

Code: Select all

# apt install zoneminder
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
zoneminder ist schon die neueste Version (1.34.12-focal1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n]
zoneminder (1.34.12-focal1) wird eingerichtet ...
Detected db service is mariadb.service
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'mysql'@'localhost' (using password: YES)'
Creating zm db
ERROR 1045 (28000): Access denied for user 'mysql'@'localhost' (using password: YES)
Error creating db.
dpkg: Fehler beim Bearbeiten des Paketes zoneminder (--configure):
 »installiertes zoneminder-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)
What can I do?
pmele57
Posts: 4
Joined: Wed May 13, 2020 1:54 pm

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by pmele57 »

Having trouble updating from 1.30 to 1.34. Followed every Wiki, forum post and google search and it always comes up with "Error: A later version is already installed." using zoneminder_1.34.11-1_amd64.deb or deb https://zmrepo.zoneminder.com/debian/release-1.34 buster/.

Please help!
redxiii
Posts: 48
Joined: Thu Aug 05, 2010 1:47 am

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by redxiii »

I have fresh installation of Debian Buster and followed the instructions in the wiki to install 1.34.x but it doesn't start and there isn't any useful information available. Any idea what the problem is? thx

Code: Select all

root@gemma:~# systemctl start zoneminder
Job for zoneminder.service failed because the control process exited with error code.
See "systemctl status zoneminder.service" and "journalctl -xe" for details.

root@gemma:~# systemctl status zoneminder.service
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
   Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Sat 2020-06-20 17:41:13 MST; 8s ago
  Process: 9031 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=1/FAILURE)

root@gemma:~# journalctl -xe
Jun 20 17:44:11 gemma systemd[1]: Starting ZoneMinder CCTV recording and surveillance system...
-- Subject: A start job for unit zoneminder.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit zoneminder.service has begun execution.
-- 
-- The job identifier is 38819.
Jun 20 17:44:11 gemma zmpkg[9319]: INF [Sanity checking States table...]
Jun 20 17:44:11 gemma zmpkg[9319]: INF [Command: start]
Jun 20 17:44:11 gemma su[9327]: (to www-data) root on none
Jun 20 17:44:11 gemma su[9327]: pam_unix(su:session): session opened for user www-data by (uid=0)
Jun 20 17:44:11 gemma systemd[1]: Started Session c399 of user www-data.
-- Subject: A start job for unit session-c399.scope has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit session-c399.scope has finished successfully.
-- 
-- The job identifier is 38879.
Jun 20 17:44:11 gemma su[9327]: pam_unix(su:session): session closed for user www-data
Jun 20 17:44:11 gemma systemd[1]: session-c399.scope: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit session-c399.scope has successfully entered the 'dead' state.
Jun 20 17:44:11 gemma su[9330]: (to www-data) root on none
Jun 20 17:44:11 gemma su[9330]: pam_unix(su:session): session opened for user www-data by (uid=0)
Jun 20 17:44:11 gemma systemd[1]: Started Session c400 of user www-data.
-- Subject: A start job for unit session-c400.scope has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit session-c400.scope has finished successfully.
-- 
-- The job identifier is 38943.
Jun 20 17:44:11 gemma su[9330]: pam_unix(su:session): session closed for user www-data
Jun 20 17:44:11 gemma systemd[1]: session-c400.scope: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit session-c400.scope has successfully entered the 'dead' state.
Jun 20 17:44:11 gemma systemd[1]: zoneminder.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- An ExecStart= process belonging to unit zoneminder.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Jun 20 17:44:11 gemma systemd[1]: zoneminder.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit zoneminder.service has entered the 'failed' state with result 'exit-code'.
Jun 20 17:44:11 gemma systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
-- Subject: A start job for unit zoneminder.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit zoneminder.service has finished with a failure.
-- 
-- The job identifier is 38819 and the job result is failed.
redxiii
Posts: 48
Joined: Thu Aug 05, 2010 1:47 am

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by redxiii »

This is also happening for me.
skyking wrote: Sat Mar 28, 2020 7:19 am I reinstalled the server from scratch due to a hard drive change. I did everything the same as before at the wki linked above, but I got an error at
systemctl start zoneminder

It exited with an error, but when I got apache configured and restarted, the zm console was working.
I added a camera and did the first configs in options. all seemed OK.
When I check the logs, zmpkg.pl is starting over and over, and the pid keeps going up. It does not exit or crash and the cam is viewable, it records events.
sanity checking states table
command start

Over and over.
any ideas?
redxiii
Posts: 48
Joined: Thu Aug 05, 2010 1:47 am

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by redxiii »

bbunge wrote: Sat Mar 28, 2020 2:01 pm You need to have Apache2 installed and configured before you install Zoneminder. I have installed Zoneminder 1.34.x many times on Buster with LAMP and LEMP and have had no issues!
What is there to configure? Apache is running as evidenced that I can access the zm web interface
bbunge
Posts: 2951
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by bbunge »

redxiii wrote: Sun Jun 21, 2020 1:20 am
bbunge wrote: Sat Mar 28, 2020 2:01 pm You need to have Apache2 installed and configured before you install Zoneminder. I have installed Zoneminder 1.34.x many times on Buster with LAMP and LEMP and have had no issues!
What is there to configure? Apache is running as evidenced that I can access the zm web interface
Just ran the WIKI install on a fresh Buster with Apache2 and Mariadb. Had no issues.
https://wiki.zoneminder.com/Debian_10_B ... om_ZM_Repo
Make sure your user has sudo permissions.
Make sure the "wget" process to install the keys completes without error! If it does not complete you will not get the most recent Zoneminder version this procedure is written for.
redxiii
Posts: 48
Joined: Thu Aug 05, 2010 1:47 am

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by redxiii »

forgot to quote sorry
Last edited by redxiii on Sun Jun 21, 2020 2:33 am, edited 1 time in total.
redxiii
Posts: 48
Joined: Thu Aug 05, 2010 1:47 am

Re: Debian Buster install procedure for Zoneminder 1.34.x

Post by redxiii »

bbunge wrote: Sun Jun 21, 2020 1:57 am
redxiii wrote: Sun Jun 21, 2020 1:20 am
bbunge wrote: Sat Mar 28, 2020 2:01 pm You need to have Apache2 installed and configured before you install Zoneminder. I have installed Zoneminder 1.34.x many times on Buster with LAMP and LEMP and have had no issues!
What is there to configure? Apache is running as evidenced that I can access the zm web interface
Just ran the WIKI install on a fresh Buster with Apache2 and Mariadb. Had no issues.
https://wiki.zoneminder.com/Debian_10_B ... om_ZM_Repo
Make sure your user has sudo permissions.
Make sure the "wget" process to install the keys completes without error! If it does not complete you will not get the most recent Zoneminder version this procedure is written for.
I followed the guide linked in the wiki. ufw isn't installed so don't need those commands. I can see the default apache webpage.

I installed mariadb-server and ran the secure installation script. Didn't run this script the first time, but I can still run mariadb and it connects and shows the prompt. No need to create example_database so i skipped those commands.

PHP version 7.3 is installed.

Steps 4 - 6-- skipped, anything relevant that i shouldn't be skipping?

removed zoneminder and autoremoved everything else. sudo isn't installed by default in Debian. I installed it. But i'm running the commands from the root user anyway. Re-ran all of the commands in the wiki. wget command works fine... first time i just removed sudo. Either way it returned "OK". ZM is version 1.34.15-buster1

Still having the same problem. Perhaps you could share the specific commands that you are running which aren't documented in the wiki? the instructions written as is are not sufficient for some reason.
Post Reply