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

Posted 大数据从业者

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PSQLException: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "ambari", 相关的知识,希望对你有一定的参考价值。

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

以上是关于PSQLException: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "ambari", 的主要内容,如果未能解决你的问题,请参考以下文章

PostgreSQ 连接问题 FATAL: no pg_hba.conf entry for host

使用 jOOQ 和 Spring Boot 进行集成测试时出现“PSQLException: FATAL: sorry, too many clients already”错误

在 docker 中运行时出现异常:org.postgresql.util.PSQLException:致命:用户“hamzabelmellouki”的密码验证失败

org.postgresql.util.PSQLException:致命:主机没有 pg_hba.conf 条目

org.postgresql.util.PSQLException:致命:从 Spring Boot 连接到 postgres 时用户“postgres”的密码验证失败

当我运行我的测试套件时,它们因 PSQLException 失败:致命:抱歉,已经有太多客户端了