antdb数据库连接时,为什么显示“FATAL: no adb_hba.conf entry for host “10.21.28.35”,FATAL: no adb_hba.conf entry for host “10.21.28.35”, user “adb01”, database “postgres”, SSL off”。

0 denude 11个月前 176次点击

如题,antdb数据库连接时,出为什么显示“FATAL: no adb_hba.conf entry for host “10.21.28.35”,FATAL: no adb_hba.conf entry for host “10.21.28.35”, user “adb01”, database “postgres”, SSL off”。

共 1 条评论
AntDB数据库 11个月前
0 

解决方式

AntDB单机版本:

adb_hba.conf添加一行可信任配置:

host all all 10.21.28.0/24 md5

重新加载配置即可。其中 10.21.28.0 需要访问数据库的客户端IP网段。

adb_ctl -D /data/pgxc_data/cd1/ reload

-D 后面的参数为数据目录。

reload执行成功后,重新尝试登录。

建议在主备环境上都执行下,防止主备切换后应用无法连接现在的备节点。

AntDB集群版本:
登录adbmgr执行下述命令即可:

add hba coordinator all("host all all 10.21.28.0 24 md5");
add hba gtmcoord all("host all all 10.21.28.0 24 md5");

示例中的IP根据实际情况进行修改。

如果执行报错,通过\h add hba可查看帮助信息。

执行成功后,重新尝试登录。

原因说明

节点的adb_hba.conf未配置该IP信息。

添加一条新评论

登录后可以发表评论 去登录