首页 > 解决方案 > PgPool-II 后端认证失败

问题描述

我正在尝试将 pgpool 配置为我的 Postgres 集群的负载均衡器。我有两个 postgres 节点,1 个主节点和 1 个从节点。

我的 pg_hba.conf 看起来像

hostssl  user  mydb  1.1.1.1/32  md5
hostssl  user  postgres 1.1.1.1/32  md5
host     user  mydb  1.1.1.1/32  md5
host     user  postgres 1.1.1.1/32  md5

1.1.1.1/32我的实际 pgpool 服务器 IP在哪里。

如果我尝试直接从 pgpool 容器中使用 psql 建立与以太主机或从机的连接,我可以毫无问题地做到这一点。但是当我启动 pgpool 时,我收到了这个错误信息:

2021-10-26 13:50:13: pid 753: ERROR:  backend authentication failed
2021-10-26 13:50:13: pid 753: DETAIL:  backend response with kind 'E' when expecting 'R'
2021-10-26 13:50:13: pid 753: HINT:  This issue can be caused by version mismatch (current version 3)
2021-10-26 13:50:13: pid 736: ERROR:  backend authentication failed
2021-10-26 13:50:13: pid 736: DETAIL:  backend response with kind 'E' when expecting 'R'
2021-10-26 13:50:13: pid 736: HINT:  This issue can be caused by version mismatch (current version 2)

如果我编辑pool_passwd文件并设置了一些无效密码,我得到了一个正确的错误


2021-10-26 13:59:03: pid 736: ERROR:  md5 authentication failed
2021-10-26 13:59:03: pid 736: DETAIL:  password does not match

所以我想这不是我的 postgres 凭据的问题。

有任何想法吗?

标签: postgresqlpgpool

解决方案


推荐阅读