May 3, 2022
by dhoytt
0 comments
Not sure what was occurring with my Zoneminder CCTV but it seemed my database was corrupt or had issues authenticating with my streams periodically over the past week especially one camera. Then today they all went dark and Zoneminder couldn’t talk to any of the cameras.
I started getting errors like the following for all streams :
Can't open memory map file /dev/shm/zm.mmap
Then the management UI gave me this error after I tried to restart Zoneminder:
ZoneMinder Error
Unable to connect to ZM db using dsn mysql:host=localhost;dbname=zm
SQLSTATE[HY000] [2002] Connection refused
ZoneMinder will retry connection in 26 seconds.
The mariadb logs gave me the following errors:
2022-05-02 10:47:55 0 [ERROR] mysqld: Server GSSAPI error (major 851968, minor 2529639093) : gss_acquire_cred failed -Unspecified GSS failure.
2022-05-02 10:47:55 0 [Warning] mysqld: GSSAPI plugin : default principal 'mariadb/coral@' not found in keytab
2022-05-02 10:47:55 0 [ERROR] mysqld: Server GSSAPI error (major 851968, minor 2529639093) : gss_acquire_cred failed -Unspecified GSS failure. Minor code may provide more information. Keytab FILE:/etc/krb5.keytab is nonexistent or empty.
I hadn’t really did anything except updated the OS Rocky Linux a Centos 8 fork the day before and I checked that it didn’t update Zoneminder but maybe it did some where along the line because it said it was at 3.6.12 and the Zoneminder database was still at 3.6.8. The update script (zmupdate.pl) failed with DB user authentication errors as well.
I tried a number of quick remedies before I decided to just drop the Zoneminder database and start over but was still having issues so I uninstalled Zoneminder and attempted to reinstall using the repositories and proceeded to get another list of errors and issues:
Error:
Problem 1: package zoneminder-httpd-1.36.12-1.el8.x86_64 requires zoneminder-common(x86-64) = 1.36.12-1.el8, but none of the providers can be installed
- conflicting requests
- nothing provides perl(DateTime) needed by zoneminder-common-1.36.12-1.el8.x86_64
- nothing provides perl(Data::UUID) needed by zoneminder-common-1.36.12-1.el8.x86_64
Problem 2: package zoneminder-1.36.12-1.el8.x86_64 requires zoneminder-common(x86-64) = 1.36.12-1.el8, but none of the providers can be installed
- conflicting requests
- nothing provides perl(DateTime) needed by zoneminder-common-1.36.12-1.el8.x86_64
- nothing provides perl(Data::UUID) needed by zoneminder-common-1.36.12-1.el8.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@coral log]#
I ended up having to install/enable the powertools repo:
dnf config-manager --set-enabled powertools
Once everything was up and installed and Zoneminder was running the services without crashing again I still had to get in the mariadb cli and correct the mysql password user I had been going back and forth changing to the correct password. Then I was in Zoneminder again able to recreate all my prior sources except one. I have two Speco cameras and there’s no way to hard reset or otherwise reset the password to factory settings. I’m fairly certain I have the right passwords but both cameras initially wouldn’t let me in. Then one camera let me in using the password I knew, and I created another admin user, so I set that camera source up just fine in Zoneminder along with my other 4 cameras. The other Speco camera just would not let me in and the other Speco I had created the other user with suddenly would let me login but kick me out unless I used the new user. I ran into this behavior a few times with the Speco cameras and this time I’m ordering another camera that will be here later today through Amazon with much better resolution. I’ll put the new camera in see how it performs and maybe upgrade other cameras afterwards. The Speco gives good resolution in night conditions so if the new camera matches that with more robust features I will go that route.
In parallel while looking through Zoneminder forums and ultimately the Zoneminder wiki on starting fresh I downloaded and configured Shinobi CCTV on the same Rocky Linux system and pointed it to the storage area I use for storing Zoneminder events. I had looked into Shinobi about 4 or 5 years ago and ran it in parallel with Zoneminder and tested it back then. Shinobi is much improved! The camera source URL’s aren’t out there for you to see easily any longer plus its fairly intuitive in comparison with Zoneminder, I just have more familiarity with Zoneminder now.
Shinobi did have some issues with the stream of the Speco camera I was able to configure with Zoneminder and I stopped there as Zoneminder was responsive now and I had other things to do like eat and minor domestic stuff in the kitchen plus caught some of the games on TV.
I then went to my dhoytt.com site and was hit with the web certificate being out of date as of today. I went to Godaddy downloaded the certs and in 10 minutes had the new ones in place.
What a Monday I thought would be relaxing and making progress on other things. Oh well that’s how it goes sometimes!
So Zoneminder is back up will evaluate Shinobi some more and my web certificates are up to date on my site. I will incorporate newer cameras into the mix and I also need to look into the release notes of Zoneminder as I noticed some new authentication methods with streams so maybe that tripped me up. Bedtime is here!