I've install pgbouncer-1.7.2 on the same Linux server as PostgreSQL-9.6 database. When I try to connect to my local database using pgbouncer, database ask to enter password. For example:
psql -p 6432 -U postgres -d mydb10 -h localhost
**Password for user postgres:**
Login is OK after I enter the password. The same direct request run without password:
psql -p 5432 -U postgres -d mydb10 -h localhost
psql (9.6.5)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.
mydb10=# \q
Pgbouncer settings (not all of them):
[databases]
* = host=127.0.0.1 port=5432 auth_user=postgres pool_size=20
[pgbouncer]
listen_addr = *
listen_port = 6432
auth_type = md5
auth_file = /etc/pgbouncer/userlist.txt
;; auth_query = SELECT usename, passwd FROM pg_shadow WHERE usename=$1
PostgreSQL settings (not all of them):
port = 5432
All METHOD in pg_hba.conf are set to 'trust'. If I set auth_type = trust, connection via pgbouncer do not require password. What is interesting is that the same configuration when pgbouncer installed on separate server, has no such problem.
Pleas, let me know if you have any idea how to fix this.