Page 1 of 1

Nagiosix database scripts not repairing DB

Posted: Wed Jun 08, 2016 9:23 pm
by ira
Latest NagiosXI on RHEL6.7

Getting this error:

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

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh
Normally running this script repairs the database but now it just returns no output immediately. I've run the following as well:

Code: Select all

/usr/local/nagiosxi/scripts/repairmysql.sh nagiosql
/usr/local/nagiosxi/scripts/repairmysql.sh nagios
and both run through the script and outputs:

Code: Select all


Content deleted here
.....

Starting mysqld:                                           [  OK  ]
/usr/local/nagiosxi/scripts

===============
REPAIR COMPLETE
===============

This is a pretty urgent production issue.

Re: Nagiosix database scripts not repairing DB

Posted: Wed Jun 08, 2016 9:25 pm
by ira
Sorry, forgot to say that this issue seems to have stemmed from our /var/ partition running out of space. Space has now been cleared.

Re: Nagiosix database scripts not repairing DB

Posted: Wed Jun 08, 2016 10:01 pm
by Box293
ira wrote:

Code: Select all


Content deleted here
.....

Starting mysqld:                                           [  OK  ]
/usr/local/nagiosxi/scripts

===============
REPAIR COMPLETE
===============
What is the "Content deleted here" ? It may have errors that help resolve your issue.

The "Emergency Restore" section of this KB article may be your solution.

https://support.nagios.com/kb/article.php?id=492

Re: Nagiosix database scripts not repairing DB

Posted: Thu Jun 16, 2016 8:45 pm
by ira
Thanks for the help. Looks like the issue was a that postgres had died as well (this install is upgraded from 4.X to 5).

Fixed by restarting Postgres with:

Code: Select all

/usr/local/nagiosxi/scripts/manage_services.sh restart postgresql

Re: Nagiosix database scripts not repairing DB

Posted: Fri Jun 17, 2016 9:11 am
by lmiltchev
I am glad your issue has been resolved! Is it safe to lock this tread?