Nagios XI 2024R1 upgrade issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jbabic2
Posts: 5
Joined: Wed Jul 20, 2022 6:42 am

Re: Nagios XI 2024R1 upgrade issue

Post by jbabic2 »

I also get this kind of error when upgrading from 5.11.3 to 2024R1. MySQL password is default, but my DB server is not on the same host and I think they "hardcoded" this into the upgrade script. Please fix this ASAP!

mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
User avatar
lgute
Posts: 120
Joined: Mon Apr 06, 2020 2:49 pm

Re: Nagios XI 2024R1 upgrade issue

Post by lgute »

@jbabic2, thank you for reaching out.

We are aware of this issue and a ticket has been created.
Please let us know if you have any other questions or concerns.

-Laura
jbabic2
Posts: 5
Joined: Wed Jul 20, 2022 6:42 am

Re: Nagios XI 2024R1 upgrade issue

Post by jbabic2 »

lgute wrote: Wed Jan 03, 2024 9:43 am @jbabic2, thank you for reaching out.

We are aware of this issue and a ticket has been created.
lgute, are there any news regarding this problem?
BenCowan
Posts: 68
Joined: Thu Jul 28, 2011 11:34 am

Re: Nagios XI 2024R1 upgrade issue

Post by BenCowan »

Hey everybody, I'm hoping this is related to my circumstance, but not entirely sure. Approximately a week ago, I attempted to upgrade our TEST and DR systems from R2024r1 to 2024r1.01, and the Database Maintenance alert stayed RED, and I had very little time to debug, but I thought I saw log messages regarding the mysql password for DBMAINT was invalid, or something to that effect. I just decided to restore back to R2024r1, and was expecting to see a new fixed release coming out soon.

Does anyone have a similar experience or advise where to go from here. Is there a post upgrade procedure to resolve this? I could do it again, if more documentation is needed.
bbahn
Posts: 120
Joined: Thu Jan 12, 2023 5:42 pm

Re: Nagios XI 2024R1 upgrade issue

Post by bbahn »

Hello @BenCowan,

You can check your passwords with the script /usr/local/nagiosxi/scripts/get_mysql_passwords.sh
April: Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
BenCowan
Posts: 68
Joined: Thu Jul 28, 2011 11:34 am

Re: Nagios XI 2024R1 upgrade issue

Post by BenCowan »

Okay, so I ran that script on my R2024R1 and R2024R1.02 systems and got the same output. I was waiting for another release to see if Nagios fixed this problem, but I'm getting the same errors. What does this mean from the dbmaint.log?:

Database Error: Could not connect to database
Access denied for user 'dbmaint_nagiosxi'@'localhost' (using password: YES)
Mon, 04 Mar 2024 09:15:01 -0800 LOCKFILE '/usr/local/nagiosxi/var/dbmaint.lock' EXISTS - EXITING!
Mon, 04 Mar 2024 09:20:01 -0800 LOCKFILE '/usr/local/nagiosxi/var/dbmaint.lock' EXISTS - EXITING!
Mon, 04 Mar 2024 09:30:02 -0800 LOCKFILE '/usr/local/nagiosxi/var/dbmaint.lock' EXISTS - EXITING!
Mon, 04 Mar 2024 09:35:02 -0800 LOCKFILE '/usr/local/nagiosxi/var/dbmaint.lock' EXISTS - EXITING!
Mon, 04 Mar 2024 09:40:01 -0800 LOCKFILE '/usr/local/nagiosxi/var/dbmaint.lock' EXISTS - EXITING!
Mon, 04 Mar 2024 09:45:02 -0800 LOCKFILE '/usr/local/nagiosxi/var/dbmaint.lock' IS OLD - REMOVING
Mon, 04 Mar 2024 09:45:02 -0800 CREATING: /usr/local/nagiosxi/var/dbmaint.lock
Database Error: Could not connect to database
Access denied for user 'dbmaint_nagiosxi'@'localhost' (using password: YES)
User avatar
danderson
Posts: 119
Joined: Wed Aug 09, 2023 10:05 am

Re: Nagios XI 2024R1 upgrade issue

Post by danderson »

jbabic2 wrote: Thu Jan 25, 2024 5:16 am lgute, are there any news regarding this problem?
The issue with offloaded databases should be fixed in XI 2024R1.0.2.

Before upgrade, I would verify that your XI instances has the correct root password in both /usr/local/nagiosxi/var/xi-sys.cfg and /usr/local/nagiosxi/etc/xi-sys.cfg under the mysqlpass parameter.

If you source this file, . /usr/local/nagiosxi/var/xi-sys.cfg
You should be able to log in with mysql -u root -p$mysqlpass -h [IP or hostname of mysql database].

If you have an offloaded databases, the root user also needs to have the grant option granted. It sounds goofy but when you grant all permissions to a user, the grant option is not included. So on the machine with the mysql database, you would log into mysql and do something like GRANT ALL ON *.* to root@`[Your XI IP address/hostname]` WITH GRANT OPTION;
User avatar
danderson
Posts: 119
Joined: Wed Aug 09, 2023 10:05 am

Re: Nagios XI 2024R1 upgrade issue

Post by danderson »

BenCowan wrote: Mon Mar 04, 2024 12:50 pm Okay, so I ran that script on my R2024R1 and R2024R1.02 systems and got the same output. I was waiting for another release to see if Nagios fixed this problem, but I'm getting the same errors. What does this mean from the dbmaint.log?:

Database Error: Could not connect to database
Access denied for user 'dbmaint_nagiosxi'@'localhost' (using password: YES)
Mon, 04 Mar 2024 09:15:01 -0800 LOCKFILE '/usr/local/nagiosxi/var/dbmaint.lock' EXISTS - EXITING!
Mon, 04 Mar 2024 09:20:01 -0800 LOCKFILE '/usr/local/nagiosxi/var/dbmaint.lock' EXISTS - EXITING!
Mon, 04 Mar 2024 09:30:02 -0800 LOCKFILE '/usr/local/nagiosxi/var/dbmaint.lock' EXISTS - EXITING!
Mon, 04 Mar 2024 09:35:02 -0800 LOCKFILE '/usr/local/nagiosxi/var/dbmaint.lock' EXISTS - EXITING!
Mon, 04 Mar 2024 09:40:01 -0800 LOCKFILE '/usr/local/nagiosxi/var/dbmaint.lock' EXISTS - EXITING!
Mon, 04 Mar 2024 09:45:02 -0800 LOCKFILE '/usr/local/nagiosxi/var/dbmaint.lock' IS OLD - REMOVING
Mon, 04 Mar 2024 09:45:02 -0800 CREATING: /usr/local/nagiosxi/var/dbmaint.lock
Database Error: Could not connect to database
Access denied for user 'dbmaint_nagiosxi'@'localhost' (using password: YES)
Another user encountered a similar problem. This is my response.
viewtopic.php?p=356029#p356029
jbabic2
Posts: 5
Joined: Wed Jul 20, 2022 6:42 am

Re: Nagios XI 2024R1 upgrade issue

Post by jbabic2 »

danderson wrote: Tue Mar 12, 2024 11:27 am
jbabic2 wrote: Thu Jan 25, 2024 5:16 am lgute, are there any news regarding this problem?
The issue with offloaded databases should be fixed in XI 2024R1.0.2.

Before upgrade, I would verify that your XI instances has the correct root password in both /usr/local/nagiosxi/var/xi-sys.cfg and /usr/local/nagiosxi/etc/xi-sys.cfg under the mysqlpass parameter.

If you source this file, . /usr/local/nagiosxi/var/xi-sys.cfg
You should be able to log in with mysql -u root -p$mysqlpass -h [IP or hostname of mysql database].

If you have an offloaded databases, the root user also needs to have the grant option granted. It sounds goofy but when you grant all permissions to a user, the grant option is not included. So on the machine with the mysql database, you would log into mysql and do something like GRANT ALL ON *.* to root@`[Your XI IP address/hostname]` WITH GRANT OPTION;
Thank you for letting me know. I successfully upgraded Nagios XI from version 5.11.1 to 2024R1.0.2 with databases on separate MySQL server.
Post Reply