PSQLException: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "ambari", database "ambari", SSL off

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

posted @ 2018-12-21 09:17  大数据从业者FelixZh  阅读(3319)  评论(0编辑  收藏  举报