Errors in DB trying to upgrade to XI 5
- 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
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
Log in as root for mysql and run:
Then try to run the upgrade again.
Code: Select all
use nagios;
repair table 'nagios_processevents';
unlock tables;
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
- 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
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
Sorry, there shouldn't have been quotes around that, use
Code: Select all
use nagios;
repair table nagios_processevents;
unlock tables;- 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
Now I'm getting this one:
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?
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!
-
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
Now that you have already run
You should be able to run the normal DB repair script
Code: Select all
unlock tables;Code: Select all
/usr/local/nagiosxi/scripts/repair_databases.sh- 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
K, ran that script, looks like it ran fine. Tried the update again and now I'm getting this:
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.
- 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
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,
- 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
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- 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
K, I think I have it sorted. Running update from GUI now and will report back.