DB Connect Error - Postgresql Will Not Run
Posted: Thu Sep 27, 2012 8:35 am
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.
"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.