We receive the following errors when I attempt to access the web interface.
DB Connect Error [nagiosxi]: Database connection failed DB Connect Error [nagiosxi]: Database connection failed
What version of Nagios XI are you using? Nagios XI 2012R2.5
Linux Distribution and version? CentOS release 5.4
32 or 64bit? 32 bit
VMware Image or Manual Install of XI? vmware image
It started issuing this error, so I rebooted the box cleanly from the guest O/S. (shutdown -ry 0). Error keeps occurring. I checked to ensure that we have plenty of free space/free inodes.
[root@incentive ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
33G 7.6G 24G 25% /
/dev/sda1 99M 18M 76M 20% /boot
tmpfs 1.5G 0 1.5G 0% /dev/shm
/dev/mapper/nagiosVolGRP-nagiosLV
40G 16G 22G 43% /nagios
[root@incentive ~]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VolGroup00-LogVol00
8880128 95188 8784940 2% /
/dev/sda1 26104 41 26063 1% /boot
tmpfs 219864 1 219863 1% /dev/shm
/dev/mapper/nagiosVolGRP-nagiosLV
5232640 920 5231720 1% /nagios
Also checked the $PATH variable.
[nagios@incentive root]$ echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root@incentive ~]#
Any help would be appreciated.
DB Connections Failing when attempting to view Web Interface
-
[email protected]
- Posts: 15
- Joined: Mon Sep 23, 2013 3:12 pm
Re: DB Connections Failing when attempting to view Web Inter
Is postgresql running?
Try restarting it:
See if you can log in postgres:
You may need to vacuum the postgres. Run the following command in terminal:
Let me know if this helped.
Code: Select all
service postgresql statusCode: Select all
service postgresql restart
service postgresql statusCode: Select all
psql nagiosxi nagiosxiCode: Select all
echo "vacuum;vacuum analyze;vacuum full;"|psql nagiosxi postgresBe sure to check out our Knowledgebase for helpful articles and solutions!
-
[email protected]
- Posts: 15
- Joined: Mon Sep 23, 2013 3:12 pm
Re: DB Connections Failing when attempting to view Web Inter
[root@incentive ~]# service postgresql status
postmaster (pid 1197 1196 1195 1193 1132) is running...
[root@incentive ~]# service postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]
[root@incentive ~]# service postgresql status
postmaster (pid 9720 9719 9718 9715 9713) is running...
[root@incentive ~]# psql nagiosxi nagiosxi
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
[root@incentive ~]# echo "vacuum;vacuum analyze;vacuum full;"|psql nagiosxi postgres
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
[root@incentive ~]#
postmaster (pid 1197 1196 1195 1193 1132) is running...
[root@incentive ~]# service postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]
[root@incentive ~]# service postgresql status
postmaster (pid 9720 9719 9718 9715 9713) is running...
[root@incentive ~]# psql nagiosxi nagiosxi
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
[root@incentive ~]# echo "vacuum;vacuum analyze;vacuum full;"|psql nagiosxi postgres
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
[root@incentive ~]#
Re: DB Connections Failing when attempting to view Web Inter
It seems like you need to run the vacuum in a "standalone" mode. You may try running the following commands:
Let me know if this fixed your issue.
Code: Select all
service postgresql stop
su postgres
echo "VACUUM FULL;" > /tmp/fix.sql
postgres -D /var/lib/pgsql/data nagiosxi < /tmp/fix.sql
echo "VACUUM FULL;" > /tmp/fix.sql
postgres -D /var/lib/pgsql/data postgres < /tmp/fix.sql
echo "VACUUM FULL;" > /tmp/fix.sql
postgres -D /var/lib/pgsql/data template1 < /tmp/fix.sql
exit
service postgresql startBe sure to check out our Knowledgebase for helpful articles and solutions!
-
[email protected]
- Posts: 15
- Joined: Mon Sep 23, 2013 3:12 pm
Re: DB Connections Failing when attempting to view Web Inter
It did resolve the issue - thanks for the help! Please close this case.