Page 1 of 1

DB constantly going corrupt?

Posted: Tue Apr 05, 2016 5:45 pm
by Garf36
Hi there,
Just installed the demo XI and everything is working properly. However, whenever we access the web console, after a few clicks, we start to see a database corruption message. The console disappears and no longer works.
Message: A database connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, please contact Nagios support.

Run the following from the CLI as root to attempt to repair the DB

/usr/local/nagiosxi/scripts/repair_databases.sh
We do the repair, it works for another few clicks and goes corrupt again. Checking the MySQL logs, we see a similar error:
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_programstatus' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_programstatus'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_logentries' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_logentries'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_systemcommands' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_systemcommands'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_processevents' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_processevents'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_configfiles' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_configfiles'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_configfilevariables' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_configfilevariables'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_commands' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_commands'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_timeperiods' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_timeperiods'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_timeperiod_timeranges' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_timeperiod_timeranges'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_contacts' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_contacts'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_contact_notificationcommands' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_contact_notificationcommands'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_contactgroups' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_contactgroups'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_contactgroup_members' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_contactgroup_members'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_host_contactgroups' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_host_contactgroups'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_service_contactgroups' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_service_contactgroups'
160405 18:28:09 [ERROR] mysqld: Table './nagios/nagios_runtimevariables' is marked as crashed and should be repaired
160405 18:28:09 [Warning] Checking table: './nagios/nagios_runtimevariables'
160405 18:28:35 [ERROR] mysqld: Table './nagios/nagios_statehistory' is marked as crashed and should be repaired
160405 18:28:35 [Warning] Checking table: './nagios/nagios_statehistory'
160405 18:30:05 mysqld_safe Number of processes running now: 0
160405 18:30:05 mysqld_safe mysqld restarted
Any ideas what the problem might be?


Thanks!

Re: DB constantly going corrupt?

Posted: Wed Apr 06, 2016 11:02 am
by rkennedy
Can you PM over a system profile for us to take more of a look at what's going on? (Admin -> System Profile -> Download Profile)

Also, what version of XI are you running?

Re: DB constantly going corrupt?

Posted: Thu Apr 07, 2016 1:48 pm
by Garf36
Hi ,

I don't seem to have PM available?

My board says "We are sorry, but you are not authorised to use this feature. You may have just registered here and may need to participate more to be able to use this feature."

Re: DB constantly going corrupt?

Posted: Thu Apr 07, 2016 1:59 pm
by tmcdonald
Should be good now, you need to get past the 2-post mark. Let us know when you've PMed it.

Re: DB constantly going corrupt?

Posted: Fri Apr 08, 2016 10:36 am
by Garf36
Was looking over the Mariadb logs and saw some issues with memory.. then realized I had built my test VPS too small. Upped the memory and all is working great!

Thanks for your offer to help.

Re: DB constantly going corrupt?

Posted: Fri Apr 08, 2016 10:51 am
by tmcdonald
Great to hear it! Mind if we close this thread out?