error connecting to pgbouncer admin console

Started by Zwettler Markus (OIZ)over 4 years ago3 messagesgeneral
Jump to latest
#1Zwettler Markus (OIZ)
Markus.Zwettler@zuerich.ch

I did a pgbouncer configuration using the following ini file:

[databases]
* = host=localhost port=5433 auth_user=pgbouncer
[users]
[pgbouncer]
logfile = /pgdata/pcl_l002/pgbouncer/pgbouncer_pcl_l002.log
pidfile = /pgdata/pcl_l002/pgbouncer/pgbouncer_pcl_l002.pid
listen_addr = *
listen_port = 6433
auth_type = hba
auth_file = /pgdata/pcl_l002/pgbouncer/userlist_pcl_l002.txt
auth_hba_file = /pgdata/pcl_l002/pg_hba.conf
auth_user = pgbouncer
auth_query = SELECT * FROM pgbouncer.get_auth($1)
admin_users = monitor
stats_users = stats, monitor
max_client_conn = 500
default_pool_size = 20
log_connections = 1
log_disconnections = 1
log_pooler_errors = 1

Everything is fine as long as I connect to any database within the postgres cluster as any user.

As soon as I try to connect to the pgbouncer admin console I get the following error:

$ psql -h localhost -p 6433 -U monitor pgbouncer
psql: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

$ psql -h localhost -p 6433 -U stats pgbouncer
psql: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

There is always the same error within the pgbouncer logfile:
...
...
2021-12-07 16:56:53.550 CET [73046] LOG process up: PgBouncer 1.16.1, libevent 2.0.21-stable (epoll), adns: libc-2.17, tls: OpenSSL 1.0.2k-fips 26 Jan 2017
2021-12-07 16:57:00.969 CET [73046] FATAL @src/objects.c:312 in function put_in_order(): put_in_order: found existing elem

$ pgbouncer --version
PgBouncer 1.16.1
libevent 2.0.21-stable
adns: libc-2.17
tls: OpenSSL 1.0.2k-fips 26 Jan 2017

Any idea?

Thanks, Markus

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Zwettler Markus (OIZ) (#1)
Re: error connecting to pgbouncer admin console

On 07.12.21 17:10, Zwettler Markus (OIZ) wrote:

I did a pgbouncer configuration using the following ini file:

[databases]
* = host=localhost port=5433 auth_user=pgbouncer

Using the name "pgbouncer" for auth_user is buggy. Try using a
different name.

#3Zwettler Markus (OIZ)
Markus.Zwettler@zuerich.ch
In reply to: Zwettler Markus (OIZ) (#1)
AW: error connecting to pgbouncer admin console

Simply a bug.

https://github.com/pgbouncer/pgbouncer/issues/568

Cheers, Markus

Show quoted text

-----Ursprüngliche Nachricht-----
Von: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
Gesendet: Dienstag, 7. Dezember 2021 17:10
An: pgsql-general@lists.postgresql.org
Betreff: error connecting to pgbouncer admin console

I did a pgbouncer configuration using the following ini file:

[databases]
* = host=localhost port=5433 auth_user=pgbouncer [users] [pgbouncer] logfile =
/pgdata/pcl_l002/pgbouncer/pgbouncer_pcl_l002.log
pidfile = /pgdata/pcl_l002/pgbouncer/pgbouncer_pcl_l002.pid
listen_addr = *
listen_port = 6433
auth_type = hba
auth_file = /pgdata/pcl_l002/pgbouncer/userlist_pcl_l002.txt
auth_hba_file = /pgdata/pcl_l002/pg_hba.conf auth_user = pgbouncer auth_query
= SELECT * FROM pgbouncer.get_auth($1) admin_users = monitor stats_users =
stats, monitor max_client_conn = 500 default_pool_size = 20 log_connections = 1
log_disconnections = 1 log_pooler_errors = 1

Everything is fine as long as I connect to any database within the postgres cluster
as any user.

As soon as I try to connect to the pgbouncer admin console I get the following
error:

$ psql -h localhost -p 6433 -U monitor pgbouncer
psql: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

$ psql -h localhost -p 6433 -U stats pgbouncer
psql: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

There is always the same error within the pgbouncer logfile:
...
...
2021-12-07 16:56:53.550 CET [73046] LOG process up: PgBouncer 1.16.1,
libevent 2.0.21-stable (epoll), adns: libc-2.17, tls: OpenSSL 1.0.2k-fips 26 Jan
2017
2021-12-07 16:57:00.969 CET [73046] FATAL @src/objects.c:312 in function
put_in_order(): put_in_order: found existing elem

$ pgbouncer --version
PgBouncer 1.16.1
libevent 2.0.21-stable
adns: libc-2.17
tls: OpenSSL 1.0.2k-fips 26 Jan 2017

Any idea?

Thanks, Markus