Zoneminder install on Ubuntu failed

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
KaptanFranje
Posts: 9
Joined: Thu Aug 22, 2024 1:13 pm

Zoneminder install on Ubuntu failed

Post by KaptanFranje »

Back to square one... I had a succesful installation on Ubuntu server 24.04.1 LTS. However, I destroyed the file system and had to reinstall ubuntu from zero. And now try to install zoneminder again, but without success so far.

I made all the necessary steps, but here is the result:

>kapetan@serveronevallo:~$ sudo systemctl status zoneminder.service
>[sudo] password for kapetan:
>× zoneminder.service - ZoneMinder CCTV recording and surveillance system
> Loaded: loaded (/usr/lib/systemd/system/zoneminder.service; enabled; preset: enabled)
> Active: failed (Result: exit-code) since Sun 2024-09-01 08:50:24 UTC; 6h ago
> Docs: http://zoneminder.readthedocs.org/en/latest/
> Process: 20133 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255/EXCEPTION)
> CPU: 55ms
>
>Sep 01 08:50:24 serveronevallo zmpkg.pl[20133]: DBD::mysql::st execute failed: Table 'zm.Config' doesn't exist at >/usr/share/perl5/ZoneMinder/Config.pm line 98.
>Sep 01 08:50:24 serveronevallo zmpkg.pl[20133]: Can't execute: Table 'zm.Config' doesn't exist at /usr/share/perl5/ZoneMinder.pm line 33.
>Sep 01 08:50:24 serveronevallo zmpkg.pl[20133]: BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 150.
>Sep 01 08:50:24 serveronevallo zmpkg.pl[20133]: Compilation failed in require at /usr/share/perl5/ZoneMinder.pm line 33.
>Sep 01 08:50:24 serveronevallo zmpkg.pl[20133]: BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33.
>Sep 01 08:50:24 serveronevallo zmpkg.pl[20133]: Compilation failed in require at /usr/bin/zmpkg.pl line 34.
>Sep 01 08:50:24 serveronevallo zmpkg.pl[20133]: BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 34.
>Sep 01 08:50:24 serveronevallo systemd[1]: zoneminder.service: Control process exited, code=exited, status=255/EXCEPTION
>Sep 01 08:50:24 serveronevallo systemd[1]: zoneminder.service: Failed with result 'exit-code'.
>Sep 01 08:50:24 serveronevallo systemd[1]: Failed to start zoneminder.service - ZoneMinder CCTV recording and surveillance system.

What shall I do?
mikb
Posts: 693
Joined: Mon Mar 25, 2013 12:34 pm

Re: Zoneminder install on Ubuntu failed

Post by mikb »

KaptanFranje wrote: Sun Sep 01, 2024 3:41 pm
" Table 'zm.Config' doesn't exist "

What shall I do?
Look closely at the steps you followed for the parts about creating the ZM database. You may well have MariaDB or MySQL installed, but there needs to be a database inside that, created during the ZM install.

Did you miss anything out, or see any error messages that indicated something failed?
KaptanFranje
Posts: 9
Joined: Thu Aug 22, 2024 1:13 pm

Re: Zoneminder install on Ubuntu failed

Post by KaptanFranje »

First of all, my zone minder (and mysql) user is different from the ubuntu user. The zoneminder (and mysql) user is admin. My ubuntu superuser is different...
Here are the mysql priviligies of admin:
mysql> SHOW GRANTS FOR 'admin'@'localhost';
+-------------------------------------------------------+
| Grants for admin@localhost |
+-------------------------------------------------------+
| GRANT USAGE ON *.* TO `admin`@`localhost` |
| GRANT ALL PRIVILEGES ON `zm`.* TO `admin`@`localhost` |
+-------------------------------------------------------+
2 rows in set (0.00 sec)
mikb
Posts: 693
Joined: Mon Mar 25, 2013 12:34 pm

Re: Zoneminder install on Ubuntu failed

Post by mikb »

KaptanFranje wrote: Sun Sep 01, 2024 6:47 pm First of all, my zone minder (and mysql) user is different from the ubuntu user. The zoneminder (and mysql) user is admin. My ubuntu superuser is different...
Here are the mysql priviligies of admin:
mysql> SHOW GRANTS FOR 'admin'@'localhost';
+-------------------------------------------------------+
| Grants for admin@localhost |
+-------------------------------------------------------+
| GRANT USAGE ON *.* TO `admin`@`localhost` |
| GRANT ALL PRIVILEGES ON `zm`.* TO `admin`@`localhost` |
+-------------------------------------------------------+
2 rows in set (0.00 sec)
How about :-

Code: Select all

mysql> use zm
mysql> show tables
Do you have a zm.Config table along with all sorts of other juicy Zoneminder tables? (Events, Filters, Logs ...) or is it missing? Or are they ALL missing? Or does 'use zm' say 'What??' :(
KaptanFranje
Posts: 9
Joined: Thu Aug 22, 2024 1:13 pm

Re: Zoneminder install on Ubuntu failed

Post by KaptanFranje »

show tables: empyt set
So there is no table at all :(
mikb
Posts: 693
Joined: Mon Mar 25, 2013 12:34 pm

Re: Zoneminder install on Ubuntu failed

Post by mikb »

KaptanFranje wrote: Sat Sep 07, 2024 1:21 pm show tables: empyt set
So there is no table at all :(
Ah. That would explain the error message then!
I made all the necessary steps,
So there's definitely one biiiig step missing. The ZM database never got created. Check through the instructions you followed again and be on high alert for any mention of "creating the database" because something either got missed, or failed to work correctly!

https://zoneminder.readthedocs.io/en/la ... 2-04-jammy

... update system, update repositories. Good so far ... I feel uncomfortable with the size of steps here that goes "install zoneminder, configure apache, start zoneminder" because last time I did this there were waaay more manual steps in there. One of which was creating the database, setting permissions etc. and all that.

So I'm going to have to assume that "install zoneminder" is the step where creating the database has been made an internal automatic thing that you don't have to manually do. But it appears it didn't work.

If you scroll down a bit to the instructions for 18.04 Bionic, you'll see what I mean ...

"Step 5: Configure the ZoneMinder Database

This step should not be required on ZoneMinder 1.32.0. ... "

So clearly this should all happen by install magic, and not manual user intervention!
KaptanFranje
Posts: 9
Joined: Thu Aug 22, 2024 1:13 pm

Re: Zoneminder install on Ubuntu failed

Post by KaptanFranje »

For another reason, I decided to again reinstall ubuntu server. And then reinstall zoneminder.

Samer error, however I relized that at the step:
sudo add-apt-repository ppa:iconnor/zoneminder-1.36
There is an error message:
Error:6 https://ppa.launchpadcontent.net/iconno ... .36/ubuntu noble Release
404 Not Found [IP: 185.125.190.80 443]
Reading package list... Ready
E: A(z) „https://ppa.launchpadcontent.net/iconno ... .36/ubuntu noble Release” container has no Release file.
etc.
User avatar
iconnor
Posts: 3335
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Zoneminder install on Ubuntu failed

Post by iconnor »

Use ppa:iconnor/zoneminder-proposed.
Post Reply