pgbouncer 信任身份验证失败

问题描述 投票:0回答:1

我正在尝试创建一个连接到 postgresql 数据库的 spring 应用程序。该应用程序在直接连接到数据库时工作正常,但当我尝试通过 pgbouncer 连接到它时,信任身份验证失败。我想连接到 pgbouncer 来实现负载平衡。

目前一切都在本地主机上运行。我的应用程序尝试连接到 pgbouncer 但出现以下错误:

LOG C-0x5583ca3d3490: (nodb)/(nouser)@127.0.0.1:39042 no such user: postgres
LOG C-0x5583ca3d3490: (nodb)/[email protected]:39042 login attempt: db=Test69 user=postgres tls=no
LOG C-0x5583ca3d3490: (nodb)/[email protected]:39042 closing because: "trust" authentication failed (age=0s)
WARNING C-0x5583ca3d3490: (nodb)/[email protected]:39042 pooler error: "trust" authentication failed

据我了解,信任身份验证应该让任何人连接,但由于某种原因它失败了

java spring postgresql pgbouncer
1个回答
0
投票

信任认证仍然需要指定的用户存在。 在您的情况下,指定的用户不存在(根据 pgbouncer,所以大概它不在“user_list.txt”或您的配置中调用的任何内容中。)

© www.soinside.com 2019 - 2024. All rights reserved.