Page 1 of 1

Can't start zoneminder service

Posted: Fri Feb 16, 2024 10:07 am
by altesCoon
Hi there.

I installed zm following the instructions in https://zoneminder.readthedocs.io/en/la ... buntu.html .

Ubuntu 22.04
zm 1.36 from ubuntu repository

When i try

Code: Select all

systemctl status zoneminder.service
i get these error messages:

Code: Select all

Feb 16 10:55:49 pt-t430 zmpkg[8707]: ERR [Error reconnecting to db: errstr:Unknown database 'zm' error val:]
Feb 16 10:55:49 pt-t430 zmpkg.pl[8707]: Unable to connect to DB. ZM Cannot continue.
Feb 16 10:55:49 pt-t430 zmpkg.pl[8707]: BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 150.
Feb 16 10:55:49 pt-t430 zmpkg.pl[8707]: Compilation failed in require at /usr/share/perl5/ZoneMinder.pm line 33.
Feb 16 10:55:49 pt-t430 zmpkg.pl[8707]: BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33.
Feb 16 10:55:49 pt-t430 zmpkg.pl[8707]: Compilation failed in require at /usr/bin/zmpkg.pl line 34.
Feb 16 10:55:49 pt-t430 zmpkg.pl[8707]: BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 34.
Feb 16 10:55:50 pt-t430 systemd[1]: zoneminder.service: Control process exited, code=exited, status=255/EXCEPTION
Feb 16 10:55:50 pt-t430 systemd[1]: zoneminder.service: Failed with result 'exit-code'.
Feb 16 10:55:50 pt-t430 systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
I know, there is no database zm in mysql yet. Do i have to create it myself? I don't read about that in the link above (and other instructions).

When i try

Code: Select all

http://localhost/zm/
in browser, i get:

Code: Select all

Fatal error: Uncaught TypeError: array_replace(): Argument #1 ($array) must be of type array, bool given in /usr/share/zoneminder/www/includes/config.php:52 Stack trace: #0 /usr/share/zoneminder/www/includes/config.php(52): array_replace() #1 /usr/share/zoneminder/www/index.php(46): require_once('...') #2 {main} thrown in /usr/share/zoneminder/www/includes/config.php on line 52
What did i misunderstand?
Any help?

Thank you for all answers
Peter

Re: Can't start zoneminder service

Posted: Fri Feb 16, 2024 1:14 pm
by Rayj00
I think the database is created in the install.

Check here: https://wiki.zoneminder.com/MySQL#About

Re: Can't start zoneminder service

Posted: Fri Feb 16, 2024 8:32 pm
by Ruler
I recently installed on Debian (which is what Ubuntu is built on) and do not remember having to manually create the database. Maybe try reinstalling from apt to trigger the scripts again? Or remove, reboot, and then install? (Sorry I do not have better ideas - just trying to come up with something that might trigger the database to be created on your system.)

Re: Can't start zoneminder service

Posted: Sat Feb 17, 2024 12:00 am
by dougmccrary
The database zm is created during install.
When you started, had you done
sudo su ?
Won't work if you don't, last I saw...

Re: Can't start zoneminder service

Posted: Thu Feb 22, 2024 9:29 am
by altesCoon
Thank you all for your answers.
When you started, had you done
sudo su ?
I did not. There was nothing about that in the Installation Guide I linked above.

Okay, i removed and purged zm now and reinstalled it with the sudo su before.

Now I get this error:

Code: Select all

ERR [Error reconnecting to db: errstr:Access denied for user 'zmuser'@'localhost' (using password: YES) error val:]
I thought i can simply install this software, but it seems that i have to be an administrator and database expert ;-)
I never worked with mysql on linux, so i have no idea what is going on in the background.

Re: Can't start zoneminder service

Posted: Thu Feb 22, 2024 9:44 am
by dougmccrary
I admit it's easy to do it wrong.
Please see this post. viewtopic.php?p=129569#p129569
It really works!
It works just as well on Ubuntu desktop, if you're more comfortable with that.