NagiosXI Update Failed - 2014r2.6 to 2014r2.7
-
Lisa.sorenson
- Posts: 17
- Joined: Wed Mar 05, 2014 11:37 am
NagiosXI Update Failed - 2014r2.6 to 2014r2.7
When running NagiosXI update from version 2.6 to 2.7 I am getting this message:
Backing up MySQL databases...
mysqldump: Got error: 145: Table './nagios/nagios_customvariablestatus' is marked as crashed and should be repaired when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!
How do I resolve this?
Thanks
Backing up MySQL databases...
mysqldump: Got error: 145: Table './nagios/nagios_customvariablestatus' is marked as crashed and should be repaired when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!
How do I resolve this?
Thanks
Re: NagiosXI Update Failed - 2014r2.6 to 2014r2.7
What is the output of the following command?
You may need to run the repair on the database:
Code: Select all
tail -20 /var/log/mysqld.logCode: Select all
cd /usr/local/nagiosxi/scripts
./repair_databases.shBe sure to check out our Knowledgebase for helpful articles and solutions!
-
Lisa.sorenson
- Posts: 17
- Joined: Wed Mar 05, 2014 11:37 am
Re: NagiosXI Update Failed - 2014r2.6 to 2014r2.7
The output from that command is:
Table ' ./nagios/nagios_customvariablestatus' is marked as crashed and should be repaired
Table ' ./nagios/nagios_customvariablestatus' is marked as crashed and should be repaired
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NagiosXI Update Failed - 2014r2.6 to 2014r2.7
Please run these commands:
Once these are completed please re-run the upgrade.
Code: Select all
cd /usr/local/nagiosxi/scripts
./repair_databases.shAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
Lisa.sorenson
- Posts: 17
- Joined: Wed Mar 05, 2014 11:37 am
Re: NagiosXI Update Failed - 2014r2.6 to 2014r2.7
Ran that command and am still getting same error when running update.
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: NagiosXI Update Failed - 2014r2.6 to 2014r2.7
Code: Select all
[root@localhost ~]# service mysqld stop
Stopping mysqld: [ OK ]
[root@localhost ~]# myisamchk -r -f /var/lib/mysql/nagios/nagios_customvariablestatus
- recovering (with sort) MyISAM-table '/var/lib/mysql/nagios/nagios_customvariablestatus'
Data records: 4
- Fixing index 1
- Fixing index 2
- Fixing index 3
[root@localhost ~]# service mysqld start
Starting mysqld: [ OK ]-
Lisa.sorenson
- Posts: 17
- Joined: Wed Mar 05, 2014 11:37 am
Re: NagiosXI Update Failed - 2014r2.6 to 2014r2.7
The update still did not complete successfully:
Backing up MySQL databases...
mysqldump: Got error: 145: Table './nagios/nagios_logentries' is marked as crashed and should be repaired when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!
Do I run the same command for _logentries and try again?
Backing up MySQL databases...
mysqldump: Got error: 145: Table './nagios/nagios_logentries' is marked as crashed and should be repaired when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!
Do I run the same command for _logentries and try again?
-
Lisa.sorenson
- Posts: 17
- Joined: Wed Mar 05, 2014 11:37 am
Re: NagiosXI Update Failed - 2014r2.6 to 2014r2.7
Tried cleaning up the logentries and get this:
Backing up MySQL databases...
mysqldump: Got error: 144: Table './nagios/nagios_processevents' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!
Backing up MySQL databases...
mysqldump: Got error: 144: Table './nagios/nagios_processevents' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: NagiosXI Update Failed - 2014r2.6 to 2014r2.7
You really shouldn't have to do this...
Did this server suffer a hard shutdown, or is it maybe a restore from a VMware snapshot or something? This is not typical behavior.
Only perform the above if you have a backup you know is good of your database. This does a forceful repair on all tables and could potentially involve data loss.
Did this server suffer a hard shutdown, or is it maybe a restore from a VMware snapshot or something? This is not typical behavior.
Code: Select all
service mysqld stop
for file in `ls /var/lib/mysql/nagios/ | grep "MYI"`; do myisamchk -r -f /var/lib/mysql/nagios/$file; done
service mysqld start-
Lisa.sorenson
- Posts: 17
- Joined: Wed Mar 05, 2014 11:37 am
Re: NagiosXI Update Failed - 2014r2.6 to 2014r2.7
Thank you, that command appeared to work with no loss of data. I was able to update to 2.7 successfully.
Thanks!
Thanks!