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.
DB Connect Error - Postgresql Will Not Run
-
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
Can you run the following and return the output
Code: Select all
df -hRe: DB Connect Error - Postgresql Will Not Run
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
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.
You will need to clear up some space on the disk before you can move further.
Re: DB Connect Error - Postgresql Will Not Run
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
You likely need to resize the disk on the VM
http://library.nagios.com/library/produ ... -disk-size
http://library.nagios.com/library/produ ... -disk-size
Re: DB Connect Error - Postgresql Will Not Run
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.