Page 1 of 1

Upgrading to Lastest Version Nagios XI

Posted: Tue Jul 19, 2016 3:54 pm
by jgutierrez
Hello, we are a active Nagios customer but we are unable to posts topics on the Customer Support Forum. Please correct this issue.

When upgrading our Nagios XI server from version 5.2.5 to 5.2.9 we are getting the message

mysqldump: Got error: 145: Table './nagios/nagios_logentries' is marked as crashed and should be repaired when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!

When Nagios was installed we used a different password for the root and MySQL admin account.

The Previous upgrade to 5.2.5 did not have the same issues with incorrect password so we are wondering why we are having password issues now?

Re: Upgrading to Lastest Version Nagios XI

Posted: Tue Jul 19, 2016 4:03 pm
by rkennedy
Hello, we are a active Nagios customer but we are unable to posts topics on the Customer Support Forum. Please correct this issue.
Please email [email protected] with this request, as we do not have any control on the forums.

The repair script depends on things to be changed in specific places, did you follow this document after changing any of the passwords? https://assets.nagios.com/downloads/nag ... ios-XI.pdf

To repair the DB, what happens if you run /usr/local/nagiosxi/scripts/repair_databases.sh?

Re: Upgrading to Lastest Version Nagios XI

Posted: Tue Jul 19, 2016 4:23 pm
by jgutierrez
Uploading Profile of Nagios XI server

Re: Upgrading to Lastest Version Nagios XI

Posted: Tue Jul 19, 2016 4:31 pm
by rkennedy
rkennedy wrote:
The repair script depends on things to be changed in specific places, did you follow this document after changing any of the passwords? https://assets.nagios.com/downloads/nag ... ios-XI.pdf

To repair the DB, what happens if you run /usr/local/nagiosxi/scripts/repair_databases.sh?
I see we received your profile. This helps, but the questions above are still pending. Could you please answer them, and review the document I linked?

Re: Upgrading to Lastest Version Nagios XI

Posted: Wed Jul 20, 2016 2:41 pm
by jgutierrez
These steps were done when we first installed Nagios XI, the last update performed in Feb 2016 did not generate any password errors.

Is there someplace else that the password would need to be edited to make the automated update successfully?

Jim G.

Re: Upgrading to Lastest Version Nagios XI

Posted: Wed Jul 20, 2016 3:16 pm
by mcapra
That script can fail with the message "Error backing up MySQL database '<database>' - check the password in this script!" regardless of where the actual mysqldump failure is. A malformed/incorrect password is simply the most common cause. In this case, it looks as if damaged tables are causing the mysqldump to fail on your system.

Please run the /usr/local/nagiosxi/scripts/repair_databases.sh script to see if a myisamchk is able to rectify the damaged tables. After that, run the /usr/local/nagiosxi/scripts/backup_xi.sh script to see if a backup can be successfully created.

Re: Upgrading to Lastest Version Nagios XI

Posted: Wed Jul 20, 2016 3:20 pm
by tgriep
That error message is kind of mis-leading. It looks like you have a corrupt MYSQL database and is needs to be repaired.
If you updated the usernames and passwords from the guide, you should be able to repair the database by logging in as root to the server and running the following commands.

Code: Select all

cd /usr/local/nagiosxi/scripts
./repair_databases.sh
If you get any errors after running this, please post them.

If the database is repaired, you can try the upgrade again and see if it works for you.

Re: Upgrading to Lastest Version Nagios XI

Posted: Wed Jul 20, 2016 4:25 pm
by jgutierrez
Success!!!!

After performing the database repair the upgrade completed successfully.

Thank you for all your help.

Jim G.

Re: Upgrading to Lastest Version Nagios XI

Posted: Wed Jul 20, 2016 4:35 pm
by mcapra
Is it alright if we lock this thread and mark the issue as resolved?