Upgrading NagiosXI 5.9.1 to 5.11.1 failed due to mysql

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
infraprivy
Posts: 7
Joined: Sat Jan 08, 2022 7:35 am

Upgrading NagiosXI 5.9.1 to 5.11.1 failed due to mysql

Post by infraprivy »

Dear support

i have an issue my nagiosXI couldn't be updated to newest version. i already offload the NagiosXI database to external mysql and it says my database is "database is not in a usable configuration.
Please revert to your pre-upgrade snapshot and reach out to the Support Team". please kindly help

Many Thanks
sgardil
Posts: 350
Joined: Wed Aug 09, 2023 9:58 am

Re: Upgrading NagiosXI 5.9.1 to 5.11.1 failed due to mysql

Post by sgardil »

Hey @Infraprivy

Have you tried repairing your database yet? If not lets try that before reverting to the previous snapshot. Make sure to take another snap shot before doing this, provided you have the space to do so, just incase our repair script doesn't do the job and if someone else has another possible solution. For a quick run down to run the repair script disable you mysql

Code: Select all

service mysqld stop
and then run this command

Code: Select all

/usr/local/nagiosxi/scripts/repairmysql.sh nagios
after this fully finishes you can start your mysql back up with

Code: Select all

service mysqld start
Let us know if this helps. If you want to read more about the repair process here is a link to our documentation.
https://assets.nagios.com/downloads/nag ... tabase.pdf
infraprivy
Posts: 7
Joined: Sat Jan 08, 2022 7:35 am

Re: Upgrading NagiosXI 5.9.1 to 5.11.1 failed due to mysql

Post by infraprivy »

Hi @sgardil

I tried that but it shows

"The storage engine for the table doesn't support repair"
sgardil
Posts: 350
Joined: Wed Aug 09, 2023 9:58 am

Re: Upgrading NagiosXI 5.9.1 to 5.11.1 failed due to mysql

Post by sgardil »

infraprivy wrote: Wed Sep 20, 2023 3:42 am Hi @sgardil

I tried that but it shows

"The storage engine for the table doesn't support repair"
Do you have a working snapshot to restore from? From reading up on this topic it seems that your db has been corrupted but our script wont change the engine of the db. If so I would suggest reverting and attempting the upgrade again. If not it sounds like the way to fix the db is to change the engine of the db tables. I don't know enough about the two different table types or if we need them to be a specific one within XI so I can't comfortably suggest doing this yet.

Here is an interesting read if you would like to learn more about the different mysql table types.
https://web.archive.org/web/20120829150 ... nd-myisam/
infraprivy
Posts: 7
Joined: Sat Jan 08, 2022 7:35 am

Re: Upgrading NagiosXI 5.9.1 to 5.11.1 failed due to mysql

Post by infraprivy »

sgardil wrote: Wed Sep 20, 2023 9:32 am
infraprivy wrote: Wed Sep 20, 2023 3:42 am Hi @sgardil

I tried that but it shows

"The storage engine for the table doesn't support repair"
Do you have a working snapshot to restore from? From reading up on this topic it seems that your db has been corrupted but our script wont change the engine of the db. If so I would suggest reverting and attempting the upgrade again. If not it sounds like the way to fix the db is to change the engine of the db tables. I don't know enough about the two different table types or if we need them to be a specific one within XI so I can't comfortably suggest doing this yet.

Here is an interesting read if you would like to learn more about the different mysql table types.
https://web.archive.org/web/20120829150 ... nd-myisam/
Hi @sgradil

if i use the snapshot on same mysql db with inndob engine then restore that snapshot. it is possible to do it?
sgardil
Posts: 350
Joined: Wed Aug 09, 2023 9:58 am

Re: Upgrading NagiosXI 5.9.1 to 5.11.1 failed due to mysql

Post by sgardil »

infraprivy wrote: Mon Sep 25, 2023 10:19 pm
sgardil wrote: Wed Sep 20, 2023 9:32 am
infraprivy wrote: Wed Sep 20, 2023 3:42 am Hi @sgardil

I tried that but it shows

"The storage engine for the table doesn't support repair"
Do you have a working snapshot to restore from? From reading up on this topic it seems that your db has been corrupted but our script wont change the engine of the db. If so I would suggest reverting and attempting the upgrade again. If not it sounds like the way to fix the db is to change the engine of the db tables. I don't know enough about the two different table types or if we need them to be a specific one within XI so I can't comfortably suggest doing this yet.

Here is an interesting read if you would like to learn more about the different mysql table types.
https://web.archive.org/web/20120829150 ... nd-myisam/
Hi @sgradil

if i use the snapshot on same mysql db with inndob engine then restore that snapshot. it is possible to do it?
I may not understand the question fully, but when I mention a snapshot I'm referring to a snapshot of the vm your XI instance is on. In that instance whenever you restore to the snapshot everything should be in the same state that the snapshot was taken in. It's always a good ideal to make a snapshot before making alterations just incase the changes break things. So you would have needed a snapshot before seeing the storage engine issues if you wanted to retry the upgrade process to see if something weird happened during the first upgrade. I hope this answers your question but if not please let me know.
Post Reply