Page 1 of 1

DB Connect Error - Postgresql Will Not Run

Posted: Thu Sep 27, 2012 8:35 am
by vdixon
Not sure what caused this issue however I recently updated Nagios to the latest version and was able to access the web interface normally. A few days passed and now I'm getting the following error when accessing via web browser: "DB Connect Error [nagiosxi]: Database connection failed". After searching for a solution I came across this possible fix:
"The problem we identified with gnome was that the PATH for the "service" command gets changed under gnome. This needs to be set correctly so that the scripts starting with 3-dbservers will run correctly. You can test if the path is set correctly by trying the following commands":
service httpd restart
service postgresql restart


When running the service postgresql restart I get "FAILED". I found an article here suggesting a fix: I believe its to remove/reinstall postgresql but once I run ./init-postgres I get: PostgresQL installed OK - continuing.... Initializing PostgresQL...Starting PostgressQl...ERROR: Could not start PostgresQL - exiting (with the word FAILED to the right in red). Any help would be appreciated. Thanks.

Re: DB Connect Error - Postgresql Will Not Run

Posted: Thu Sep 27, 2012 5:07 pm
by scottwilkerson
Can you run the following and return the output

Code: Select all

df -h

Re: DB Connect Error - Postgresql Will Not Run

Posted: Fri Sep 28, 2012 9:20 am
by vdixon
Thanks for your response, please see attachment.

Re: DB Connect Error - Postgresql Will Not Run

Posted: Sat Sep 29, 2012 5:21 pm
by scottwilkerson
Ok, this is caused by the hard disk being full.

You will need to clear up some space on the disk before you can move further.

Re: DB Connect Error - Postgresql Will Not Run

Posted: Mon Oct 01, 2012 7:13 am
by vdixon
I've provisioned 50gb for Nagios VM server and only 9.6GB is being used. How could I be out of disk space? Will I have to expand the partition?

Re: DB Connect Error - Postgresql Will Not Run

Posted: Mon Oct 01, 2012 7:25 am
by scottwilkerson
You likely need to resize the disk on the VM
http://library.nagios.com/library/produ ... -disk-size

Re: DB Connect Error - Postgresql Will Not Run

Posted: Mon Oct 01, 2012 9:41 am
by vdixon
Thanks for your help. I managed to clear up disk space and was able to restart postgresql. I will now reconfigure the partition and filesystem to use the allocated 50gb storage I initially provisioned for Nagios XI. Again, thanks for your help.