Database connection error in Nagios XI
Database connection error in Nagios XI
Hi Team,
I am getting below error while opening Nagios XI url
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
Please let me know what might be the causing of this issue.
Thanks,
Siva vani
I am getting below error while opening Nagios XI url
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
Please let me know what might be the causing of this issue.
Thanks,
Siva vani
Re: Database connection error in Nagios XI
It looks like you have crashed tables. Have you tried to run the script that the error is telling you to run?
Code: Select all
/usr/local/nagiosxi/scripts/repair_databases.shFormer Nagios Employee.
me.
me.
Re: Database connection error in Nagios XI
Yes. I tried but still it is throwing same error.
Re: Database connection error in Nagios XI
How are you doing on disk space?
Code: Select all
df -h
df -ihFormer Nagios Employee.
me.
me.
Re: Database connection error in Nagios XI
[root@aushosnagpoc00 log]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_aushosnagpoc00-lv_root
44G 40G 3.5G 92% /
tmpfs 2.9G 0 2.9G 0% /dev/shm
/dev/sda1 477M 94M 359M 21% /boot
[root@aushosnagpoc00 log]#
[root@aushosnagpoc00 log]# df -ih
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/vg_aushosnagpoc00-lv_root
2.8M 1.3M 1.6M 45% /
tmpfs 732K 1 732K 1% /dev/shm
/dev/sda1 126K 53 125K 1% /boot
[root@aushosnagpoc00 log]#
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_aushosnagpoc00-lv_root
44G 40G 3.5G 92% /
tmpfs 2.9G 0 2.9G 0% /dev/shm
/dev/sda1 477M 94M 359M 21% /boot
[root@aushosnagpoc00 log]#
[root@aushosnagpoc00 log]# df -ih
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/vg_aushosnagpoc00-lv_root
2.8M 1.3M 1.6M 45% /
tmpfs 732K 1 732K 1% /dev/shm
/dev/sda1 126K 53 125K 1% /boot
[root@aushosnagpoc00 log]#
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Database connection error in Nagios XI
Yes it looks like you are running very low on disk space.
When doing database repairs, sometimes a large table requires 2-3 times the size of the table to be available to complete the repair.
You'll need to resolve your disk space issue before proceeding.
This guide will help, keep in mind you're volume names will be different to what is mentioned in the document:
http://assets.nagios.com/downloads/nagi ... M_Disk.pdf
When doing database repairs, sometimes a large table requires 2-3 times the size of the table to be available to complete the repair.
You'll need to resolve your disk space issue before proceeding.
This guide will help, keep in mind you're volume names will be different to what is mentioned in the document:
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.
Re: Database connection error in Nagios XI
Thanks for the update, but receiving same error even after free up the space.
[root@aushosnagpoc00 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_aushosnagpoc00-lv_root
44G 18G 26G 42% /
tmpfs 2.9G 0 2.9G 0% /dev/shm
/dev/sda1 477M 94M 359M 21% /boot
[root@aushosnagpoc00 ~]#
--------------------------------------------------------------------------------------
Below is output of repair script.
===============
REPAIR COMPLETE
===============
Stopping ndo2db: head: cannot open `/usr/local/nagios/var/ndo2db.lock' for reading: No such file or directory
done.
Starting ndo2db: done.
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
Not sure where it is blocking us to login on to Nagios.
[root@aushosnagpoc00 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_aushosnagpoc00-lv_root
44G 18G 26G 42% /
tmpfs 2.9G 0 2.9G 0% /dev/shm
/dev/sda1 477M 94M 359M 21% /boot
[root@aushosnagpoc00 ~]#
--------------------------------------------------------------------------------------
Below is output of repair script.
===============
REPAIR COMPLETE
===============
Stopping ndo2db: head: cannot open `/usr/local/nagios/var/ndo2db.lock' for reading: No such file or directory
done.
Starting ndo2db: done.
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
Not sure where it is blocking us to login on to Nagios.
Re: Database connection error in Nagios XI
It could be that the postgres database may be down which could cause that error. Try running this as root and see if that resolves your issue.
Can you run this and post the output here?
Thanks
Code: Select all
service postgresql restartCode: Select all
ps -efBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Database connection error in Nagios XI
Thanks. I am able to login now.
Re: Database connection error in Nagios XI
Glad to see this is working now! I will now close this thread out, but feel free to open another if you ever need assistance.
Former Nagios Employee