Nagiosix database scripts not repairing DB

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ira
Posts: 10
Joined: Thu Feb 26, 2015 9:47 pm

Nagiosix database scripts not repairing DB

Post 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.
ira
Posts: 10
Joined: Thu Feb 26, 2015 9:47 pm

Re: Nagiosix database scripts not repairing DB

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagiosix database scripts not repairing DB

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ira
Posts: 10
Joined: Thu Feb 26, 2015 9:47 pm

Re: Nagiosix database scripts not repairing DB

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagiosix database scripts not repairing DB

Post by lmiltchev »

I am glad your issue has been resolved! Is it safe to lock this tread?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked