Page 1 of 1
A database connection err has been detected - Nothing works
Posted: Sun Oct 25, 2015 1:50 am
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
Re: A database connection err has been detected - Nothing wo
Posted: Sun Oct 25, 2015 7:39 pm
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:
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).
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
Re: A database connection err has been detected - Nothing wo
Posted: Mon Oct 26, 2015 12:49 am
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
Re: A database connection err has been detected - Nothing wo
Posted: Mon Oct 26, 2015 11:31 am
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.
Re: A database connection err has been detected - Nothing wo
Posted: Mon Oct 26, 2015 11:33 am
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
Re: A database connection err has been detected - Nothing wo
Posted: Mon Oct 26, 2015 11:57 pm
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
Re: A database connection err has been detected - Nothing wo
Posted: Tue Oct 27, 2015 1:11 am
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.
Re: A database connection err has been detected - Nothing wo
Posted: Tue Oct 27, 2015 2:10 am
by amanasteel
Hi,
I have sent an e-mail to A nagiosxi support as suggested.
Aijaz