'xi_events' is marked as crashed and should be repaired

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
NetNeutron
Posts: 36
Joined: Thu Aug 25, 2016 12:49 pm

'xi_events' is marked as crashed and should be repaired

Post by NetNeutron »

I have been trying to do a backup of nagiosxi using
/usr/local/nagiosxi/scripts/backup_xi.sh
It ends with this error
Backing up MySQL databases...
mysqldump: Got error: 145: Table './nagiosxi/xi_events' is marked as crashed and should be repaired when using LOCK TABLES
Error backing up MySQL database 'nagiosxi' - check the password in this script!

These are ongoing messages in /var/log/mysqld.log
160923 9:51:01 [ERROR] /usr/libexec/mysqld: Table './nagiosxi/xi_events' is marked as crashed and should be repaired

I checked the password as follows...
# mysql -uroot -p<DEFAULT> -e "show variables like 'max_connections';"
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 151 |
+-----------------+-------+

Which is the same password <DEFAULT> in /usr/local/nagiosxi/var/xi-sys.cfg

Please advise...
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: 'xi_events' is marked as crashed and should be repaired

Post by rkennedy »

Try repairing your tables, and then running through the backup script. it should succeed at this point. I don't think your password is the issue here.

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh
Former Nagios Employee
NetNeutron
Posts: 36
Joined: Thu Aug 25, 2016 12:49 pm

Re: 'xi_events' is marked as crashed and should be repaired

Post by NetNeutron »

I just ran the repair_databases.sh and it completed with out error..
...
This time the backup_xi.sh completed without error..

Compressing backup...

===============
BACKUP COMPLETE
===============
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: 'xi_events' is marked as crashed and should be repaired

Post by lmiltchev »

It seems like your issue has been resolved. Is it OK if we lock this topic?
Be sure to check out our Knowledgebase for helpful articles and solutions!
NetNeutron
Posts: 36
Joined: Thu Aug 25, 2016 12:49 pm

Re: 'xi_events' is marked as crashed and should be repaired

Post by NetNeutron »

YES you may lock this topic.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: 'xi_events' is marked as crashed and should be repaired

Post by rkennedy »

/closed.

Feel free to open a new one if you have issues in the future!
Former Nagios Employee
Locked