0

I am trying to connect to database using pgbouncer. Our db is POSTGRESQL which run on the managed service given by AZURE. Now after configuring Pgbouncer.ini file on Ubuntu 18.04 LTS I am facing the following issue: Whenever I try connecting using localhost :

psql -U user -h localhost -p 6432 abcd

It'll give the output as

psql: ERROR:  no pg_hba.conf entry for host "x,x,x,xx", user "username", database "dbname", SSL off

I am quite intrigued I haven't given such config they why still pgbouncer is looking for pg_hba.conf file.

Aniket Maithani
  • 845
  • 1
  • 10
  • 24
  • Are you sure your database firewall rules are not blocking the connections from the VM? – bursson Nov 03 '21 at 10:36
  • @bursson I have checked the I can remotely connect to the db using simple psql CLI if I use the direct PORT and DNS of the PSQL database. Hence this rules out the possibility of firewall rules blocking the request IMO – Aniket Maithani Nov 03 '21 at 10:46
  • pgbouncer still needs to connect to the real database server, and that still looks at pg_hba. This error, when returned to pgbouncer, gets routed by it back to the client. – jjanes Nov 03 '21 at 15:05

0 Answers0