Page 2 of 3

Re: Errors in DB trying to upgrade to XI 5

Posted: Tue Oct 06, 2015 10:31 am
by snapon_admin
nope already checked all that. I can login to the DB using the default password of nagiosxi.

Re: Errors in DB trying to upgrade to XI 5

Posted: Tue Oct 06, 2015 10:50 am
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.

Re: Errors in DB trying to upgrade to XI 5

Posted: Tue Oct 06, 2015 11:30 am
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

Re: Errors in DB trying to upgrade to XI 5

Posted: Tue Oct 06, 2015 3:01 pm
by scottwilkerson
Sorry, there shouldn't have been quotes around that, use

Code: Select all

use nagios;
repair table nagios_processevents;
unlock tables;

Re: Errors in DB trying to upgrade to XI 5

Posted: Tue Oct 06, 2015 3:34 pm
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?

Re: Errors in DB trying to upgrade to XI 5

Posted: Tue Oct 06, 2015 4:04 pm
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

Re: Errors in DB trying to upgrade to XI 5

Posted: Wed Oct 07, 2015 8:24 am
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.

Re: Errors in DB trying to upgrade to XI 5

Posted: Wed Oct 07, 2015 9:09 am
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,

Re: Errors in DB trying to upgrade to XI 5

Posted: Wed Oct 07, 2015 9:12 am
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

Re: Errors in DB trying to upgrade to XI 5

Posted: Wed Oct 07, 2015 11:16 am
by snapon_admin
K, I think I have it sorted. Running update from GUI now and will report back.