Upgrading to Lastest Version Nagios XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jgutierrez
Posts: 4
Joined: Mon Jul 18, 2016 1:03 pm

Upgrading to Lastest Version Nagios XI

Post 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?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Upgrading to Lastest Version Nagios XI

Post 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?
Former Nagios Employee
jgutierrez
Posts: 4
Joined: Mon Jul 18, 2016 1:03 pm

Re: Upgrading to Lastest Version Nagios XI

Post by jgutierrez »

Uploading Profile of Nagios XI server
Last edited by tmcdonald on Tue Jul 19, 2016 4:29 pm, edited 1 time in total.
Reason: Deleted attachment and saved for Nagios tech access
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Upgrading to Lastest Version Nagios XI

Post 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?
Former Nagios Employee
jgutierrez
Posts: 4
Joined: Mon Jul 18, 2016 1:03 pm

Re: Upgrading to Lastest Version Nagios XI

Post 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.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Upgrading to Lastest Version Nagios XI

Post 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.
Former Nagios employee
https://www.mcapra.com/
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Upgrading to Lastest Version Nagios XI

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jgutierrez
Posts: 4
Joined: Mon Jul 18, 2016 1:03 pm

Re: Upgrading to Lastest Version Nagios XI

Post by jgutierrez »

Success!!!!

After performing the database repair the upgrade completed successfully.

Thank you for all your help.

Jim G.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Upgrading to Lastest Version Nagios XI

Post by mcapra »

Is it alright if we lock this thread and mark the issue as resolved?
Former Nagios employee
https://www.mcapra.com/
Locked