When trying to restart Ambari, the restart fails with the error message below in /var/log/ambar-server/ambari-server.log
:
07 Nov 2016 16:13:32,911 ERROR [main] DBAccessorImpl:106 - Error while creating database accessor org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Ambari's backend database is not working correctly.
Check the whether Ambari backend database is working correctly; it is likely not running correctly.
If the backend database is POSTGRESQL, the following commands are useful to check the database is running:
service postgresql status service postgresql restart