On your Postgres server, you will need to update your pg_hba.conf file to allow access for the ambari user on the ambari database coming from 127.0.0.1.
Here is the location of our pg_hba.conf file: /data/pghadoop/pg_hba.conf
If its not there, run: find / -name pg_hba.conf
Here is Postgres documentation for configuring this file: http://www.postgresql.org/docs/9.5/static/auth-pg-hba-conf.html
This is what our pg_hba.conf file has for the ambari user:(设置ambari用户的任何IP均有权限)
local all ambari trust host all ambari 0.0.0.0/0 trust host all ambari ::/0 trust
Once you have made these changes, you will need to restart the Postgres server:
/etc/init.d/postgresql restart
Let me know if you have any other questions.
https://community.hortonworks.com/questions/31673/psqlexception-fatal-no-pg-hbaconf-entry-for-host-1.html
原文地址:https://www.cnblogs.com/felixzh/p/10153771.html