pgbouncer - 关闭因为:来自登录查询的意外响应
pgbouncer - closing because: unexpected response from login query
我的 pgbouncer.ini 文件:
[databases]
* = host=127.0.0.1 port=5432 auth_user=pgbouncer_auth
[pgbouncer]
listen_port = 6432
listen_addr = 127.0.0.1
auth_type = md5
auth_file = ./pgbouncer_user.txt
auth_user = pgbouncer_auth
auth_query = SELECT usename, passwd FROM user_search()
logfile = pgbouncer.log
pidfile = pgbouncer.pid
admin_users = aakashverma, postgres
我正在使用的命令
psql -p 6432 -U aakashverma -d postgres
服务器调试信息:
2021-05-24 09:52:53.001 India Standard Time [19124] LOG S-028fcb48: postgres/pgbouncer_auth@127.0.0.1:5432 closing because: unexpected response from login query (age=0s)
2021-05-24 09:52:53.015 India Standard Time [19124] LOG C-028c57a0: postgres/(nouser)@127.0.0.1:56255 closing because: unexpected response from login query (age=0s)
2021-05-24 09:52:53.027 India Standard Time [19124] WARNING C-028c57a0: postgres/(nouser)@127.0.0.1:56255 pooler error: unexpected response from login query
2021-05-24 09:53:47.414 India Standard Time [19124] LOG stats: 0 xacts/s, 0 queries/s, in 0 B/s, out 4 B/s, xact 0 us, query 0 us, wait 2467 us
2021-05-24 09:54:47.409 India Standard Time [19124] LOG stats: 0 xacts/s, 0 queries/s, in 0 B/s, out 0 B/s, xact 0 us, query 0 us, wait 0 us
2021-05-24 09:55:47.411 India Standard Time [19124] LOG stats: 0 xacts/s, 0 queries/s, in 0 B/s, out 0 B/s, xact 0 us, query 0 us, wait 0 us
我哪里错了? postgres/(nouser)
似乎给出了一些提示。
好的,所以问题是我试图以 admin_users
(aakashverma) 之一的身份登录,但我没有在 pgbouncer_user.txt
文件中提及它们 - 我的 auth_file
.我最初只有 auth_user
在那个文件中。
在文件的每一行中提及它们(我使用 auth_query
时只需用户名就足够了),就像这样
"pgbouncer_auth" "md58b235183e543896e3521c8a29a2272e1"
"aakashverma"
"postgres"
我的 pgbouncer.ini 文件:
[databases]
* = host=127.0.0.1 port=5432 auth_user=pgbouncer_auth
[pgbouncer]
listen_port = 6432
listen_addr = 127.0.0.1
auth_type = md5
auth_file = ./pgbouncer_user.txt
auth_user = pgbouncer_auth
auth_query = SELECT usename, passwd FROM user_search()
logfile = pgbouncer.log
pidfile = pgbouncer.pid
admin_users = aakashverma, postgres
我正在使用的命令
psql -p 6432 -U aakashverma -d postgres
服务器调试信息:
2021-05-24 09:52:53.001 India Standard Time [19124] LOG S-028fcb48: postgres/pgbouncer_auth@127.0.0.1:5432 closing because: unexpected response from login query (age=0s)
2021-05-24 09:52:53.015 India Standard Time [19124] LOG C-028c57a0: postgres/(nouser)@127.0.0.1:56255 closing because: unexpected response from login query (age=0s)
2021-05-24 09:52:53.027 India Standard Time [19124] WARNING C-028c57a0: postgres/(nouser)@127.0.0.1:56255 pooler error: unexpected response from login query
2021-05-24 09:53:47.414 India Standard Time [19124] LOG stats: 0 xacts/s, 0 queries/s, in 0 B/s, out 4 B/s, xact 0 us, query 0 us, wait 2467 us
2021-05-24 09:54:47.409 India Standard Time [19124] LOG stats: 0 xacts/s, 0 queries/s, in 0 B/s, out 0 B/s, xact 0 us, query 0 us, wait 0 us
2021-05-24 09:55:47.411 India Standard Time [19124] LOG stats: 0 xacts/s, 0 queries/s, in 0 B/s, out 0 B/s, xact 0 us, query 0 us, wait 0 us
我哪里错了? postgres/(nouser)
似乎给出了一些提示。
好的,所以问题是我试图以 admin_users
(aakashverma) 之一的身份登录,但我没有在 pgbouncer_user.txt
文件中提及它们 - 我的 auth_file
.我最初只有 auth_user
在那个文件中。
在文件的每一行中提及它们(我使用 auth_query
时只需用户名就足够了),就像这样
"pgbouncer_auth" "md58b235183e543896e3521c8a29a2272e1"
"aakashverma"
"postgres"