Zoneminder Running but Cannot Access GUI

ere109

Contributor
Joined
Aug 22, 2017
Messages
190
Last night I updated my zoneminder plugin. At the end of the install, I got an error about strerror_l@FBSD_1.6.
Some research led me to iocage upgrade from 12.3 to 13.1. After the upgrade, the jail starts, and zoneminder appears to be running, but I can't access the GUI.
I have checked the event database and it is still recording events. I just can't log in to see the GUI.
I saw a note about the TrueNAS update changing the MySQL user, but am yet to get past the login screen on that - bad password.
I'd prefer to access this GUI. However, I would be happy to re-install, if I can avoid losing my entire configuration.
I've got the "dump" file, taken before the update. If I do a clean install, how do I restore my configuration?
 

drinking12many

Contributor
Joined
Apr 8, 2012
Messages
148
Is the nginx service running? I have an issue on mine where after basically every time I update anything I have to fix nginx. Now mine is cert related, but zoneminder can be running while Nginx is not.
 

ere109

Contributor
Joined
Aug 22, 2017
Messages
190
I started looking up nginx and Apache the other night. I definitely think the update broke something in the config, I'm just not sure where to start. Events continue to record, so I've still got security coverage, just can't see it without downloading from cli.
 

ere109

Contributor
Joined
Aug 22, 2017
Messages
190
I confirmed, this morning, that nginx is not starting. Now to address these errors...
root@zoneminder:~ # sudo service nginx status nginx is not running. root@zoneminder:~ # sudo service nginx start Performing sanity check on nginx configuration: nginx: [emerg] SSL_CTX_use_PrivateKey("/usr/local/etc/ssl/key.pem") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch) nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed Starting nginx. nginx: [emerg] SSL_CTX_use_PrivateKey("/usr/local/etc/ssl/key.pem") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch) /usr/local/etc/rc.d/nginx: WARNING: failed to start nginx
 

drinking12many

Contributor
Joined
Apr 8, 2012
Messages
148
So in essence your problem is the same as mine, I have a CA in my lab so personally I just generated a cert from my CA and put it on my zoneminder. I am sure you could do a lets encrypt cert or something and get it going again, but basically your cert doesnt match the private key on your machine. Every time I patch the jail I just have to copy the cert I generated over to the right directory to get it going again (/usr/local/etc/ssl), you could also likely just use openssl to generate a new self signed cert and get it going again as well.
 

ere109

Contributor
Joined
Aug 22, 2017
Messages
190
Thank you. Somewhere in my labrythine notes, I had saved this gem of advice. Basically, everything in the standard conf files gets deleted with every upgrade, so "Anything that you want to change should be in a new file inside conf.d. Note that ZoneMinder will sort all the files alphabetically and run their contents in ascending order."

Next, the two most helpful pages I've found are:

and

However, after hours of attempting to track multiple cert and pem files through several folders, I got tired of digging and found a page on creating a new SSL certificate:

Of course, all of the pages I've read say the certificate still has to be certified, and I'm lost on that stage. Still plugging away.
 

ere109

Contributor
Joined
Aug 22, 2017
Messages
190
SUCCESS!!!
I created a new instance of Zoneminder, shut down both, then copied the certificates from the new jail into the old. I had to rename the certificates.
The file that points nginx to its certificates is:
/usr/local/etc/nginx/conf.d/zoneminder.conf

When I restarted, nginx came up and I had my web GUI back.
Thanks for getting me on the right track.
 

king7301

Cadet
Joined
May 11, 2023
Messages
2
SUCCESS!!!
I created a new instance of Zoneminder, shut down both, then copied the certificates from the new jail into the old. I had to rename the certificates.
The file that points nginx to its certificates is:
/usr/local/etc/nginx/conf.d/zoneminder.conf

When I restarted, nginx came up and I had my web GUI back.
Thanks for getting me on the right track.
Hey @ere109,

Currently I am experiencing the exact same thing as you mentioned above and can't get it to running. Do you mind helping me setup the certificates on my home setup? I am quite unexperienced in this area

So far I managed to generate my csr certificate but am stuck now..
 
Top