0

我有两个节点,node1(提供者),node2(订阅者)。在node2、订阅节点上设置PG逻辑时,运行时

select pglogical.create_subscription(subscription_name:='subscription_1', provider_dsn:='host=172.19.0.2 port=5432 dbname=test user=test password=<password>');

我收到以下错误:

错误:无法在复制模式下连接到 postgresql 服务器:致命:没有用于来自主机“172.19.0.3”的复制连接的 pg_hba.conf 条目,用户“test”,SSL 关闭

两个节点都是 docker 节点,node1 是预期的提供者,docker inpect显示它的容器 ip 是 172.19.0.2。node2(我在其中运行 select pglogical.create_subscription)是订阅者节点,docker inspect显示其 ip 为 172.19.0.3。在 node1 的 pg_hba.conf 文件中,我在 IPv4 部分下有以下内容:

# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
host    all             test            172.19.0.3/32           md5
host    all             test            172.19.0.4/32           trust
host    all             all             0.0.0.0/0               md5

在 postgresql.conf 我有:

listen_addresses = '*'

我不确定为什么我仍然会收到错误消息。

4

0 回答 0