Page 1 of 1

DB Connect Error

Posted: Thu May 17, 2012 7:31 am
by super_marino
Hello,

This morning, I logged into NagiosXI on the web interface and received the following error:

DB Connect Error [nagiosxi]: Database connection failed.

I did a search through the forum and found this thread:

http://support.nagios.com/forum/viewtop ... ror#p25583

I looked through the solution however when I tried to issue the first command in that thread I get an error at the CLI of Nagios.
Command = psql nagiosxi nagiosxi -c 'vacuum;'
Error =
sd 0:0:0:0: rejecting I/O to offline device
sd 0:0:0:0: rejecting I/O to offline device
-bash: /usr/bin/psql: Input/output error

Then even without any commands being entered I continually receive this error:

sd 0:0:0:0: rejecting I/O to offline device
sd 0:0:0:0: rejecting I/O to offline device
sd 0:0:0:0: rejecting I/O to offline device

I'm not a Linux expert, but it looks like the primary drive is unmounted?

With all the strange issues I've been having, it looks like this image or install of nagios might be a lemon.

Any help would be appreciated....

Thanks,

Super_Marino

Re: DB Connect Error

Posted: Thu May 17, 2012 9:14 am
by mguthrie
Can you post the output from:

Code: Select all

df -h

Re: DB Connect Error

Posted: Thu May 17, 2012 10:20 am
by super_marino
mguthrie,

Unfortunately the system (linux) won't even let me issue this command without throwing me an error.


sd 0:0:0:0: rejecting I/O to offline device
sd 0:0:0:0: rejecting I/O to offline device
-bash: /usr/bin/psql: Input/output error


Same as before.

Would you suggest I restart this system?

FYI:
- Running on a Hyper-V Server
- Latest Nagios (Virtual PC vhd image) with Updates

Re: DB Connect Error

Posted: Thu May 17, 2012 10:34 am
by mguthrie
Most definitely yes : )

Re: DB Connect Error

Posted: Thu May 17, 2012 10:44 am
by super_marino
Hi mguthrie,

Seems like after a HARD RESET, the system started working again.

I ran the repairmysql for nagios and nagiosql just to repair any corrupt portions of the DB.

Hopefully this doesn't happen again.

Any suggestions beyond this?

Re: DB Connect Error

Posted: Thu May 17, 2012 11:45 am
by scottwilkerson
This seems like for some reason your VM wasn't able to connect to it's storage on the Hyper-V Server server.. At the very least it is strange.

Sounds like you did the necessary steps for the database.

Only thing I would add is if you have any other similar issues, I would look at possible problems with the Hyper-V Server's storage.

Also, while you have it running it would be prudent to make a backup of your XI install and move it offsite in case another problem arises
http://library.nagios.com/library/produ ... -nagios-xi