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

原文地址:https://www.cnblogs.com/felixzh/p/10153771.html

时间: 2024-10-12 01:37:29

PSQLException: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "ambari", database "ambari", SSL off的相关文章

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

The server doesn't grant access to the database: the server reports FATAL: no pg_hba.conf entry for host "192.168.0.123", user "postgres", database "postgres" FATAL: no pg_hba.conf entry for host "192.168.0.123", us

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

PostgreSQ数据库为了安全,它不会监听除本地以外的所有连接请求,当用户通过JDBC访问是,会报一些如下的异常: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host 要解决这个问题,只需要在PostgreSQL数据库的安装目录下找到/data/pg_hba.conf,找到“# IPv4 local connections:” 在其下加上请求连接的机器IP host all all 127.0.0.1/

Ambari postpresql 无法启动 FATAL: no pg_hba.conf entry

Caused by: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "ambari", database "ambari", SSL off at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.

postgreSQL远程连接出现:Error connecting to server :致命错误 SSL关闭的pg_hba.conf记录

异常截图: 解决方案: [[email protected] ~]# vi /var/lib/pgsql/data/pg_hba.conf # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all ident # IPv4 local connections: host all all 127.0.0.1/32 ident hos

postgresql pg_hba.conf

pg_hba.conf是客户端认证配置文件 METHOD指定如何处理客户端的认证.常用的有ident,md5,password,trust,reject. PostgreSQL默认只监听本地端口,用netstat -tuln只会看到“tcp 127.0.0.1:5432 LISTEN”. 修改postgresql.conf中的listen_address=*,监听所有端口,这样远程才能通过TCP/IP登录数据库,用 netstat -tuln会看到“tcp 0.0.0.0:5432 LISTEN

PostgreSQL pg_hba.conf 文件简析

作者:高张远瞩(HiLoveS) 博客:http://www.cnblogs.com/hiloves/ 转载请保留该信息 最近试用PostgreSQL 9.04,将pg_hba.conf配置的一些心得分享.pg_hba.conf是客户端认证配置文件,定义如何认证客户端. 下面是常用的pg_hba.conf配置: 1 2 3 4 5 6 7 8 9 10 # TYPE  DATABASE  USER  CIDR-ADDRESS  METHOD # "local" is for Unix

PostgreSQL的 pg_hba.conf 文件简析

最近试用PostgreSQL 9.04,将pg_hba.conf配置的一些心得分享. pg_hba.conf是客户端认证配置文件,定义如何认证客户端. 下面是常用的pg_hba.conf配置: 1 2 3 4 5 6 7 8 9 10 # TYPE  DATABASE  USER  CIDR-ADDRESS  METHOD   # "local" is for Unix domain socket connections only local    all      all      

PostgreSQL的pg_hba.conf文件讲解

pg_hba.conf为PostgreSQL的访问策略配置文件,默认位于/var/lib/pgsql/10/data/目录(PostgreSQL10). 该配置文件有5个参数,分别为:TYPE(主机类型).DATABASE(数据库名).USER(用户名).ADDRESS(IP地址和掩码).METHOD(加密方法) TYPE,有4个值 local:使用Unix-domainsocket host:使用TCP/IP连接,可以是SSL的,也可以不是 hostssl:必须是SSL的 hostnossl:

PostgreSQL指定用户可访问的数据库pg_hba.conf

进入指定目录: # cd /var/lib/pgsql/9.3/data/ 使用vi编辑pg_hba.conf文件 # vi pg_hba.conf 以上配置为所有IP及网关都允许访问,使用MD5认证. postgres可访问所有数据库 bret用户仅允许访问community.community2数据库 weather仅允许访问weather数据库 原文地址:https://www.cnblogs.com/bretgui/p/9431829.html