Page 1 of 1
Ubuntu upgrade to v22 LTS killed Zoneminder
Posted: Sun Aug 14, 2022 12:38 pm
by Sento
Hi
I just upgraded from Ubuntu 21 LTS to 22 LTS and now Zoneminder fails to start. It looks like a Zoneminder file has been deleted (full search does not find it at all)
░░ Defined-By: systemd
░░ Support:
http://www.ubuntu.com/support
░░
░░ The unit zoneminder.service has entered the 'failed' state with result 'exit-code'.
Aug 14 13:30:13 zm1 zoneminder[9648]: Starting ZoneMinder:
Aug 14 13:30:13 zm1 zoneminder[9656]: /etc/init.d/zoneminder: 29: /usr/bin/zmpkg.pl: not found
Aug 14 13:30:12 zm1 systemd[1]: Failed to start LSB: Control ZoneMinder as a Service.
░░ Subject: A start job for unit zoneminder.service has failed
Is there anyway to reinstall just that file without disrupting the rest of the configuration i.e. MySQL etc?
TIA
Re: Ubuntu upgrade to v22 LTS killed Zoneminder
Posted: Sun Aug 14, 2022 1:55 pm
by Magic919
Make sure you have the iconnor PPA and run the Zoneminder install.
Re: Ubuntu upgrade to v22 LTS killed Zoneminder
Posted: Sun Aug 14, 2022 6:59 pm
by iconnor
Looks like zoneminder isn't installed anymore.
sudo add-apt-repository ppa:iconnor/zoneminder-1.36
sudo apt-get install zoneminder
Re: Ubuntu upgrade to v22 LTS killed Zoneminder
Posted: Sun Aug 14, 2022 10:30 pm
by Sento
Thanks for the replies guys. Unfortunately i ended up reinstalling php, apache and zoneminder having encountered issues with the overall interaction of the three in combination with a raft of system changes inhibiting startups etc I spent over 12 hours on this and will do a fresh "from the ground up" system rebuild as soon as is practicable.
It would be remiss of me not to give a special thank you to you Isaac for all the great work you do in providing the Zoneminder resources as you do.
Re: Ubuntu upgrade to v22 LTS killed Zoneminder
Posted: Mon Aug 15, 2022 6:00 am
by Magic919
I’m sticking with 20.04. Unless you have a need of the later stuff, it works well and is still supported for a few years.
Re: Ubuntu upgrade to v22 LTS killed Zoneminder
Posted: Mon Aug 15, 2022 6:10 am
by webdriver
Fresh new install Ubuntu 22 LTS + ZM without any issue -- didn't try upgrading because you never know a single package fail could kill the environment. So save myself by just grab a new HDD and install.
Re: Ubuntu upgrade to v22 LTS killed Zoneminder
Posted: Sun Aug 21, 2022 3:24 am
by smithjw1
Note to OP. You say you upgraded from Ubuntu 21 LTS to 22 LTS. In actuality, there is no 21 LTS. The last LTS before 22.04 was 20.04. The LTS releases are every 2 years. The 21.xx releases are called interim releases. I used to install them as well but because they affect zoneminder by switching levels of different components, like php for instance, I stopped and only upgrade from one LTS release to the next. Here is a little chart.
22.04 LTS (Jammy Jellyfish)
21.10 (Impish Indri)
21.04 (Hirsute Hippo)
20.10 (Groovy Gorilla)
20.04 LTS (Focal Fossa)
18.04 LTS (Bionic Beaver)
16.04 LTS (Xenial Xerus)
14.04 LTS (Trusty Tahr)
https://ubuntu.com/about/release-cycle
Re: Ubuntu upgrade to v22 LTS killed Zoneminder
Posted: Mon Sep 05, 2022 9:10 am
by rip
I ran into this. I think if we watched carefully, zoneminder and old PHP flavors may have been in the prompt to remove old versions when doing upgrade.
I had WEBMIN installed, and that survived the upgrade just fine, so job one was pull a copy of the Database, just in case. You could also do it on the commandline.
Some of this is redundant and not needed, I just brute forced it.
Code: Select all
1834 sudo add-apt-repository ppa:iconnor/zoneminder-1.36
...
1840 sudo apt install zoneminder
1842 sudo apt install apache2 mysql-server php
1843 sudo systemctl enable --now apache2 mysql
1844 sudo systemctl status apache2 mysql
Apache is broken, we'll come back to it.
1845 sudo apt update && sudo apt upgrade
1847 sudo rm /etc/mysql/my.cnf
1848 sudo cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf
1849 sudo nano /etc/mysql/my.cnf
Add to the end:
sql_mode = NO_ENGINE_SUBSTITUTION
1850 sudo chmod 740 /etc/zm/zm.conf
1851 sudo chown root:www-data /etc/zm/zm.conf
1852 sudo chown -R www-data:www-data /usr/share/zoneminder/
1853 sudo a2enmod cgi rewrite expires headers
1854 sudo nano /etc/php/*/apache2/php.ini
Check your Timezone
1855 sudo systemctl enable zoneminder
1856 sudo systemctl start zoneminder
1857 sudo systemctl reload apache2
1858 systemctl restart apache2
1859 systemctl status apache2.service
Apache is broken, php version?
1862 php --version
1863 cd /etc/apache2//mods-available/
1864 ls
1865 sudo a2dismod php7.4
1866 sudo a2enmod php8.1
Turn off 7.4, turn on 8.1
1867 sudo systemctl restart apache2
1868 sudo apachectl configtest
In browser, ip:80 is the apache splash screen, /zm is zoneminder with all my cameras and config
I just did this at 2AM, your mileage may vary and I'll probably find something I missed later.
Re: Ubuntu upgrade to v22 LTS killed Zoneminder
Posted: Mon Sep 05, 2022 3:26 pm
by bbunge
Sento wrote: ↑Sun Aug 14, 2022 12:38 pm
Hi
I just upgraded from Ubuntu 21 LTS to 22 LTS and now Zoneminder fails to start. It looks like a Zoneminder file has been deleted (full search does not find it at all)
░░ Defined-By: systemd
░░ Support:
http://www.ubuntu.com/support
░░
░░ The unit zoneminder.service has entered the 'failed' state with result 'exit-code'.
Aug 14 13:30:13 zm1 zoneminder[9648]: Starting ZoneMinder:
Aug 14 13:30:13 zm1 zoneminder[9656]: /etc/init.d/zoneminder: 29: /usr/bin/zmpkg.pl: not found
Aug 14 13:30:12 zm1 systemd[1]: Failed to start LSB: Control ZoneMinder as a Service.
░░ Subject: A start job for unit zoneminder.service has failed
Is there anyway to reinstall just that file without disrupting the rest of the configuration i.e. MySQL etc?
TIA
I have experienced the same behavior in upgrading Ubuntu. The installed Zoneminder gets overwritten by the one in the Ubuntu repository and Zoneminder no longer works. It can be messy!
Always good to take a dump or backup of the ZM database before doing an upgrade. Webmin makes this easy. The backup can be restored after you remove and reinstall Zoneminder.
Another possibility is to put Zoneminder on "hold" before the upgrade. Here is some discussion on "holding" a program:
https://askubuntu.com/questions/18654/h ... ic-package I remember trying this some time ago and it worked (I think).
However, I have pretty much had it with running Ubuntu and their Snaps and cloud crap on my production server. I had a drive failure last week so thought I would try Ubuntu 22.04 again. It did not last the weekend before I wiped the drive and went back to Debian Bullseye. The only plus for Ubuntu is my install script on the WIKI make doing a Zoneminder install dead easy! I still may go back to Ubuntu 20.04 as I still have a mini.iso so I can do a very minimal install without all the crap.
Re: Ubuntu upgrade to v22 LTS killed Zoneminder
Posted: Mon Sep 05, 2022 5:57 pm
by rip
Yeah, my install is minimal and headless. Only extras on it is webmin and urbackup.