Error while creating database accessor when starting Ambari
search cancel

Error while creating database accessor when starting Ambari

book

Article ID: 294958

calendar_today

Updated On:

Products

Services Suite

Issue/Introduction

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.


Environment


Cause

Ambari's backend database is not working correctly.

Resolution

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 
If the above solution does not help, review the relevant database logs and contact the provider to understand why the database is not accepting connections.