DB Connect Error - Postgresql Will Not Run

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vdixon
Posts: 4
Joined: Thu Sep 27, 2012 7:36 am

DB Connect Error - Postgresql Will Not Run

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: DB Connect Error - Postgresql Will Not Run

Post by scottwilkerson »

Can you run the following and return the output

Code: Select all

df -h
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
vdixon
Posts: 4
Joined: Thu Sep 27, 2012 7:36 am

Re: DB Connect Error - Postgresql Will Not Run

Post by vdixon »

Thanks for your response, please see attachment.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: DB Connect Error - Postgresql Will Not Run

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
vdixon
Posts: 4
Joined: Thu Sep 27, 2012 7:36 am

Re: DB Connect Error - Postgresql Will Not Run

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: DB Connect Error - Postgresql Will Not Run

Post by scottwilkerson »

You likely need to resize the disk on the VM
http://library.nagios.com/library/produ ... -disk-size
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
vdixon
Posts: 4
Joined: Thu Sep 27, 2012 7:36 am

Re: DB Connect Error - Postgresql Will Not Run

Post 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.
Locked