Page 2 of 2
Re: Nagios XI 2024R1 upgrade issue
Posted: Wed Dec 27, 2023 4:37 am
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)
Re: Nagios XI 2024R1 upgrade issue
Posted: Wed Jan 03, 2024 9:43 am
by lgute
@jbabic2, thank you for reaching out.
We are aware of this issue and a ticket has been created.
Re: Nagios XI 2024R1 upgrade issue
Posted: Thu Jan 25, 2024 5:16 am
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?
Re: Nagios XI 2024R1 upgrade issue
Posted: Mon Jan 29, 2024 8:08 am
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.
Re: Nagios XI 2024R1 upgrade issue
Posted: Tue Jan 30, 2024 3:58 pm
by bbahn
Hello @BenCowan,
You can check your passwords with the script /usr/local/nagiosxi/scripts/get_mysql_passwords.sh
Re: Nagios XI 2024R1 upgrade issue
Posted: Mon Mar 04, 2024 12:50 pm
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)
Re: Nagios XI 2024R1 upgrade issue
Posted: Tue Mar 12, 2024 11:27 am
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;
Re: Nagios XI 2024R1 upgrade issue
Posted: Tue Mar 12, 2024 11:29 am
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
Re: Nagios XI 2024R1 upgrade issue
Posted: Tue Mar 19, 2024 7:39 am
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.