DB constantly going corrupt?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Garf36
Posts: 3
Joined: Tue Apr 05, 2016 5:38 pm

DB constantly going corrupt?

Post 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!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: DB constantly going corrupt?

Post 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?
Former Nagios Employee
Garf36
Posts: 3
Joined: Tue Apr 05, 2016 5:38 pm

Re: DB constantly going corrupt?

Post 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."
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: DB constantly going corrupt?

Post by tmcdonald »

Should be good now, you need to get past the 2-post mark. Let us know when you've PMed it.
Former Nagios employee
Garf36
Posts: 3
Joined: Tue Apr 05, 2016 5:38 pm

Re: DB constantly going corrupt?

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: DB constantly going corrupt?

Post by tmcdonald »

Great to hear it! Mind if we close this thread out?
Former Nagios employee
Locked