A database connection err has been detected - Nothing works

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
amanasteel
Posts: 16
Joined: Tue Jul 06, 2010 2:08 am

A database connection err has been detected - Nothing works

Post by amanasteel »

Hi,

I am running NagiosXI 2014 R2.7 and it crashed. The web interface shows the following messg. Plz note that I have tried almost all the solutions mentioned in forums and also followed the database repair guide. Please help.

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
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

Aijaz
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: A database connection err has been detected - Nothing wo

Post by Box293 »

Can you please run these commands on your Nagios XI server in an SSH session:

Code: Select all

cd /usr/local/nagiosxi/scripts/
./repair_databases.sh
This may take a while to complete. Once it has, please scroll back up through the history to make sure there were not any database errors (you may see an ndo2db error when stopping the service but this is ok).

If you are unsure if it completed OK, please post the output here.

Run this command

Code: Select all

tail /var/log/mysqld.log -n 100 > /tmp/mysqld_log.txt
Send us this file:
/tmp/mysqld_log.txt

Also, check you have enough free disk space. Type the following at the command prompt:

Code: Select all

df -h
df -i
If disk usage is your problem, run these commands to product a breakdown of the directories at / (NOTE: This may take some time to finish).

Code: Select all

cd /
du -sh *
If you want to see more detail about a directory, cd into it and run the du -sh * command again.

If you need to add extra disk space you can follow this guide:

http://assets.nagios.com/downloads/nagi ... M_Disk.pdf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
amanasteel
Posts: 16
Joined: Tue Jul 06, 2010 2:08 am

Re: A database connection err has been detected - Nothing wo

Post by amanasteel »

Hi,

I followed the suggested steps (which I had done before opening the ticket as well) but it doesn't help. Please check the attached mysql log and advise.

Aijaz
You do not have the required permissions to view the files attached to this post.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: A database connection err has been detected - Nothing wo

Post by jdalrymple »

Can you post a screenshot of the error you're seeing? It sounds to me like your postgresql db is where the problem lies.

If that's the case it may be in your best interest to open a support ticket and we can vacuum the database manually. Fixing broken postgres is sometimes more involved than mysql.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: A database connection err has been detected - Nothing wo

Post by tgriep »

Lets restart the processes that could be causing this and see if the message goes away. Run the following as root on the Nagios system. Post back the output when running the following.

Code: Select all

service postgresql restart
service nagios stop
killall -9 nagios
service ndo2db restart
service nagios start
service postgresql status
service nagios status
service ndo2db status
Be sure to check out our Knowledgebase for helpful articles and solutions!
amanasteel
Posts: 16
Joined: Tue Jul 06, 2010 2:08 am

Re: A database connection err has been detected - Nothing wo

Post by amanasteel »

Hi,

@ jdalrymple - Please find the screenshot attached. How to open a support ticket?
@ tgriep - I have tried the mentioned steps without any luck.

Regards,

Aijaz
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: A database connection err has been detected - Nothing wo

Post by Box293 »

I think we should take this into a support ticket so we can help you through a remote session.

Please send an email to [email protected] referencing this forum thread and we'll take it from there. Reply to this thread when you have done this so we can confirm we received the email.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
amanasteel
Posts: 16
Joined: Tue Jul 06, 2010 2:08 am

Re: A database connection err has been detected - Nothing wo

Post by amanasteel »

Hi,

I have sent an e-mail to A nagiosxi support as suggested.

Aijaz
Locked