Nagios XI database connection error after password change

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dLans
Posts: 40
Joined: Tue May 27, 2014 1:54 am

Nagios XI database connection error after password change

Post by dLans »

Good morning,

Nagios XI stopped working after we followed the instructions we received begin this month in the mail 'Nagios XI security advisory'. The mail advised users of Nagios to change the default passwords on their systems. As our systems were installed by our supplier we figured we'd check and change the passwords if found necessary.
PDF with instructions: https://assets.nagios.com/downloads/nag ... ios-XI.pdf


We noticed that the NDOUTILS account was using the default n@gweb password and changed that into something new. Exact commands we used:

mysql -u root -p
use mysql;
set password for 'ndoutils'@localhost= password('PASSWORD');
quit;
systemctl restart ndo2db

Then we changed the passwords in the following files:
/usr/local/nagios/etc/ndo2db.cfg
/usr/local/nagiosxi/html/config.inc.php
/usr/local/nagvis/etc/nagvis.ini.php

But we just get the error messages below. We changed the password back into the default password but it still won't work. We restarted all Nagios related services but no luck.




Message: A database connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, please contact Nagios support.

Run the following from the CLI as root to attempt to repair the DB

/usr/local/nagiosxi/scripts/repair_databases.sh



What can I do? The repair script won't work.

Kind regards,
Dennis Lans
dLans
Posts: 40
Joined: Tue May 27, 2014 1:54 am

Re: Nagios XI database connection error after password chang

Post by dLans »

Okay found the issue. Apparently all accounts are listed in that one file and the password was changed for the wrong user. Now I just run into the issue where I change something in the core config manager and in Nagios core /nagios it is displayed correctly, but in Nagios XI nothing will update. :?:
dLans
Posts: 40
Joined: Tue May 27, 2014 1:54 am

Re: Nagios XI database connection error after password chang

Post by dLans »

This may be closed. Lack of sleep is not good for your reading skills apparently. When changing the password I accidently removed the " ' " after the password which screwed up the rest of the file.

:oops: :oops: :oops: :oops:
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios XI database connection error after password chang

Post by rkennedy »

Doh! Happens to all of us at times ;-)

Glad to see you were able to catch it!

I'll close this one out.
Former Nagios Employee
Locked