Upgraded to ubuntu 22.04 using 1.36.x of ZM and BOOM

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
juanboy2k
Posts: 22
Joined: Tue Jun 09, 2020 3:22 pm

Upgraded to ubuntu 22.04 using 1.36.x of ZM and BOOM

Post by juanboy2k »

SO I have a situation where I was using LAMP (not mariaDB) for mysql - and all was well.

my dynamic DNS i'd been using for years up and retired, so i got a new dns from no-ip. Great.

However, as soon as that happened, my images were no longer showing up, even though ZM appeared to be tracking the cameras just fine, etc. That was more than a week ago.

So since it was all screwed up already, I decided to update to 22.04 of the OS, and then it got worse, of course. So then I really went out on a limb, and installed maria DB, ran the ZM install script several times, and now, everything appears hosed, Apache2 won't start, ZM won't start, I basically have cameras outside just for the physical effect of having what looks like security cameras, even though they're useless.

My user id for mysql (zmuser) isn't able to login to the DB. Apache won't start. The new dns appears to be a problem also. it's complaining about a security issue with the lack of a cert on the web page (even the sample/test apache page).

So without wanting to restore anything, how do i just uninstall everything and start over? I've only ever installed things in UBUNTU, not being an overly experienced linux person to begin with. I'm not worried about any past images, etc., (even though i do have mysql db backups everywhere). I would just like to get things running again. I don't care whether I use mysql 'non' maria db or maria db .. just whichever one will work.

Please help.

thanks.
juanboy2k
Posts: 22
Joined: Tue Jun 09, 2020 3:22 pm

Re: Upgraded to ubuntu 22.04 using 1.36.x of ZM and BOOM

Post by juanboy2k »

root@Princess:~# service zoneminder status
● 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 Sun 2024-04-28 22:14:51 EDT; 7s ago
Process: 3370 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255/EXCEPTION)
CPU: 56ms
root@Princess:~# service apache2 status
× apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2024-04-28 22:12:03 EDT; 3min 6s ago
Docs: https://httpd.apache.org/docs/2.4/
CPU: 24ms

Apr 28 22:12:03 Princess systemd[1]: Starting The Apache HTTP Server...
Apr 28 22:12:03 Princess apachectl[874]: apache2: Syntax error on line 146 of /etc/apache2/apache2.>
Apr 28 22:12:03 Princess apachectl[835]: Action 'start' failed.
Apr 28 22:12:03 Princess apachectl[835]: The Apache error log may have more information.
Apr 28 22:12:03 Princess systemd[1]: apache2.service: Control process exited, code=exited, status=1>
Apr 28 22:12:03 Princess systemd[1]: apache2.service: Failed with result 'exit-code'.
Apr 28 22:12:03 Princess systemd[1]: Failed to start The Apache HTTP Server.
Apr 28 22:14:31 Princess systemd[1]: apache2.service: Unit cannot be reloaded because it is inactiv>
lines 1-14/14 (END)
[1]+ Stopped service apache2 status
root@Princess:~#

root@Princess:~# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
root@Princess:~#
dougmccrary
Posts: 1243
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Upgraded to ubuntu 22.04 using 1.36.x of ZM and BOOM

Post by dougmccrary »

No telling what you have now. Strongly suggest you start over with install of 22.04, LAMP, and zm.
User avatar
iconnor
Posts: 2919
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Upgraded to ubuntu 22.04 using 1.36.x of ZM and BOOM

Post by iconnor »

For apache you cut off the rest of the output that would have told what was up. But you likely just need to enable a module.

Something like sudo a2enmod rewrite

check your logs. THere is always a reason given as to why things don't work.
juanboy2k
Posts: 22
Joined: Tue Jun 09, 2020 3:22 pm

Re: Upgraded to ubuntu 22.04 using 1.36.x of ZM and BOOM

Post by juanboy2k »

SO i found the purge ZM, etc. info, and things are slightly better, if not back where I was. There's two items in this reply to ferret out - getting ZM to actually work again, 2) setting up an ssl certificate for the site itself...

Current state:

1) Purged everything
2) Reinstalled LAMP, ZM
3) Apache "everything works" page comes up when i connect to the site on my forward port.
4) Restored my DB from the last running day (which recovered my camera settings of happy memory!)
5) Status of ZM

root@Princess:/etc/apache2/sites-enabled# service zoneminder status
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2024-04-29 10:33:55 EDT; 6h ago
Process: 15915 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=0/SUCCESS)
Main PID: 15929 (zmdc.pl)
Tasks: 19 (limit: 8979)
Memory: 651.5M
CPU: 4h 10min 38.161s
CGroup: /system.slice/zoneminder.service
├─15929 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
├─15957 /usr/bin/zmc -m 1
├─15964 /usr/bin/zmc -m 2
├─15969 /usr/bin/zmc -m 4
├─15974 /usr/bin/perl -wT /usr/bin/zmfilter.pl --filter_id=1 --daemon
├─15980 /usr/bin/perl -wT /usr/bin/zmfilter.pl --filter_id=2 --daemon
├─15986 /usr/bin/perl -wT /usr/bin/zmwatch.pl
├─15991 /usr/bin/perl -wT /usr/bin/zmupdate.pl -c
├─15996 /usr/bin/perl -wT /usr/bin/zmtelemetry.pl
└─16002 /usr/bin/perl -wT /usr/bin/zmstats.pl

Apr 29 16:42:37 Princess zmc_m1[15957]: INF [zmc_m1] [Nerocam: 82100 - Capturing at 3.90 fps, capturing bandwidth 121113bytes/sec Analysin>
Apr 29 16:42:37 Princess zmc_m2[15964]: INF [zmc_m2] [PekinRdCam: 554000 - Capturing at 25.06 fps, capturing bandwidth 218560bytes/sec Ana>
Apr 29 16:42:39 Princess zmc_m4[15969]: INF [zmc_m4] [Pool Cam: 442400 - Capturing at 20.00 fps, capturing bandwidth 199675bytes/sec Analy>
Apr 29 16:42:42 Princess zmc_m2[15964]: INF [zmc_m2] [PekinRdCam: 554100 - Capturing at 24.46 fps, capturing bandwidth 254661bytes/sec Ana>
Apr 29 16:42:44 Princess zmc_m4[15969]: INF [zmc_m4] [Pool Cam: 442500 - Capturing at 19.99 fps, capturing bandwidth 157055bytes/sec Analy>
Apr 29 16:42:45 Princess zmc_m2[15964]: INF [zmc_m2] [PekinRdCam: 554200 - Capturing at 25.63 fps, capturing bandwidth 223572bytes/sec Ana>
Apr 29 16:42:49 Princess zmc_m4[15969]: INF [zmc_m4] [Pool Cam: 442600 - Capturing at 19.98 fps, capturing bandwidth 201140bytes/sec Analy>
Apr 29 16:42:49 Princess zmc_m2[15964]: INF [zmc_m2] [PekinRdCam: 554300 - Capturing at 25.06 fps, capturing bandwidth 219782bytes/sec Ana>
Apr 29 16:42:54 Princess zmc_m2[15964]: INF [zmc_m2] [PekinRdCam: 554400 - Capturing at 24.67 fps, capturing bandwidth 251550bytes/sec Ana>
Apr 29 16:42:54 Princess zmc_m4[15969]: INF [zmc_m4] [Pool Cam: 442700 - Capturing at 20.02 fps, capturing bandwidth 159564bytes/sec Analy>

so that's nice.

Now when I connect to the usual "ZM" page on my site, i get the config file sitting in the

/usr/share/zoneminder/www folder, just dumped to the screen. I'm guessing that's sort of an obvious problem to most folks (other than me)?

i have always used http://site:port/zm as the url ... but now it's just displaying a file?

Also, i did download a cert with my new DDNS site - is there a how to guide somewhere for how to get that configured with my apache2 env i have here? I'm confused about the 'sites' that need to be enabled, or created/configured vs whatever we have by default.... I know that something in the configuration has to tie in with the CN or name of the 'site' in the cert... but i have no clue how to do that.

Status of Apache2 is now good once i added my new ddns as ServerName in apache2.conf ... but i'm still getting the dump of the index.php file instead of the actual zm webpage..

thanks,
john
juanboy2k
Posts: 22
Joined: Tue Jun 09, 2020 3:22 pm

Re: Upgraded to ubuntu 22.04 using 1.36.x of ZM and BOOM

Post by juanboy2k »

So ... i think i have php installed ok but now I just get 404 not found when I try to access the /zm page.

I don't even get the php file anymore.

This is the longest i've had ZM offline since I first discovered the system years ago.

Maybe i need to just go with an off the shelf solution now.. I'm really getting tired of feeling like i'm riding a surf board on the waves in Hawaii...
juanboy2k
Posts: 22
Joined: Tue Jun 09, 2020 3:22 pm

Re: Upgraded to ubuntu 22.04 using 1.36.x of ZM and BOOM

Post by juanboy2k »

All good now. I managed to get things back to the original issue (BROKEN IMAGE ICONS), and was able to fix the dns on the OPTIONS in the console that were accessing the old URL /dns name. Now everything is fine... Until the next fiasco...
Post Reply