Page 1 of 1

Upgrading NagiosXI 5.9.1 to 5.11.1 failed due to mysql

Posted: Tue Sep 19, 2023 9:43 am
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

Re: Upgrading NagiosXI 5.9.1 to 5.11.1 failed due to mysql

Posted: Tue Sep 19, 2023 10:18 am
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

Re: Upgrading NagiosXI 5.9.1 to 5.11.1 failed due to mysql

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

I tried that but it shows

"The storage engine for the table doesn't support repair"

Re: Upgrading NagiosXI 5.9.1 to 5.11.1 failed due to mysql

Posted: Wed Sep 20, 2023 9:32 am
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/

Re: Upgrading NagiosXI 5.9.1 to 5.11.1 failed due to mysql

Posted: Mon Sep 25, 2023 10:19 pm
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?

Re: Upgrading NagiosXI 5.9.1 to 5.11.1 failed due to mysql

Posted: Tue Sep 26, 2023 9:12 am
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.