小编Jos*_*rby的帖子

尝试使用 psql 连接时 Pgbouncer 身份验证失败

我正在尝试配置最新的 pgbouncer 以与 postgres 9 一起使用。我可以使用psql正确的密码连接到我的数据库,但是当我使用时,psql -p 6432我无法连接,错误消息为psql: ERROR: auth failed

这似乎可能是由我的 userlist.txt 文件引起的,但我不确定。我检查过,所有必需的文件均由 Postgres 系统用户完全拥有

pgbouncer.ini

[databases]
postgres = host=localhost port=5433 auth_user=postgres dbname=postgres

[pgbouncer]
pidfile = /usr/local/pgbouncer-1.9.0/pgbouncer.pid
logfile = /usr/local/pgbouncer-1.9.0/log/pgbouncer.log

user = postgres

listen_addr = *
listen_port = 6432

auth_type = md5
auth_file = /usr/local/pgbouncer-1.9.0/etc/userlist.txt
Run Code Online (Sandbox Code Playgroud)

用户列表.txt

"postgres" "md5<MD5 SUM>"

用于启动 pgbouncer 的命令

./bin/pgbouncer -d etc/pgbouncer.ini

日志输出显示失败

2019-08-20 13:46:01.080 16446 LOG C-0x1028ce0: postgres/postgres@127.0.0.1:43286 login attempt: db=postgres user=postgres tls=no
2019-08-20 13:46:01.080 16446 LOG C-0x1028ce0: postgres/postgres@127.0.0.1:43286 closing …
Run Code Online (Sandbox Code Playgroud)

postgresql pgbouncer postgresql-9.3

7
推荐指数
2
解决办法
2万
查看次数

标签 统计

pgbouncer ×1

postgresql ×1

postgresql-9.3 ×1