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”。
如题,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”。
解决方式
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
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");
执行成功后,重新尝试登录。
原因说明
节点的adb_hba.conf未配置该IP信息。