Errors in DB trying to upgrade to XI 5

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Errors in DB trying to upgrade to XI 5

Post by snapon_admin »

nope already checked all that. I can login to the DB using the default password of nagiosxi.
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Errors in DB trying to upgrade to XI 5

Post by jomann »

Log in as root for mysql and run:

Code: Select all

use nagios;
repair table 'nagios_processevents';
unlock tables;
Then try to run the upgrade again.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Errors in DB trying to upgrade to XI 5

Post by snapon_admin »

Getting this on the second command:

Code: Select all

mysql> repair table 'nagios_processevents';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''nagios_processevents'' at line 1
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Errors in DB trying to upgrade to XI 5

Post by scottwilkerson »

Sorry, there shouldn't have been quotes around that, use

Code: Select all

use nagios;
repair table nagios_processevents;
unlock tables;
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Errors in DB trying to upgrade to XI 5

Post by snapon_admin »

Now I'm getting this one:

Code: Select all

mysqldump: Error 1194: Table 'nagios_conninfo' is marked as crashed and should be repaired when dumping table `nagios_conninfo` at row: 6535
Error backing up MySQL database 'nagios' - check the password in this script!
Short of repairing each table manually and then re-running the update/backup to see which one is going to be broken next is there a quick way to find borked tables and fix them?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Errors in DB trying to upgrade to XI 5

Post by scottwilkerson »

Now that you have already run

Code: Select all

unlock tables;
You should be able to run the normal DB repair script

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Errors in DB trying to upgrade to XI 5

Post by snapon_admin »

K, ran that script, looks like it ran fine. Tried the update again and now I'm getting this:
update broken.png
If I click "Go Back" I get the "Update in progress" again, but then the error pops up again a little later. I have downloaded the update to the tmp directory, but at this point I'm kind of set on doing this in the GUI just because I've only ever successfully done it this way once and I feel like this is a really great/convenient way to to the updates and I want to figure this out so I can get it to work from the GUI.
You do not have the required permissions to view the files attached to this post.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Errors in DB trying to upgrade to XI 5

Post by snapon_admin »

Alright now something is definitely not right. I'm getting more errors than ever on this box. I just rebooted it as a last ditch effort but that only seems to have made the problem slightly better. Lots of "no response from backend" and table crashed alerts. Gonna try and repair the databases one more time and see how that goes and report back. Maybe the reboot will have helped something,
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Errors in DB trying to upgrade to XI 5

Post by snapon_admin »

hmmm repair_databases script ended with a couple new lines that I've never seen before:

Code: Select all

===============
REPAIR COMPLETE
===============
/usr/local/nagiosxi/scripts/repair_databases.sh: line 15: ./manage_services.sh: No such file or directory
/usr/local/nagiosxi/scripts/repair_databases.sh: line 16: ./manage_services.sh: No such file or directory
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Errors in DB trying to upgrade to XI 5

Post by snapon_admin »

K, I think I have it sorted. Running update from GUI now and will report back.
Locked