7

i have install and configure pgbouncer on windows. pgbouncer service is running but when i connect it with postgres 9.6 it throws error '

pgbouncer can not connect to server

' create server with pgbouncer port

pgbouncer configurations are:
postgres = host=127.0.0.1 port=4851
staging29-6-1016 = host=localhost port=4851 dbname=staging29-6-1016
listen_addr = *
listen_port = 6432
auth_type = md5
auth_file = C:\Program Files (x86)\PgBouncer\etc\userlist.txt

userlist.txt also contains md5 encrypted password

postgresql.conf file contains:

listen_addresses = '*' port = 4851

kindly help me how to remove this error.

2017-08-03 15:23:33.429 2360 LOG C-00EA8FE0: postgres/postgres@[::1]:54985 login attempt: db=postgres user=postgres tls=no 
2017-08-03 15:23:33.429 2360 LOG C-00EA8FE0: postgres/postgres@[::1]:54985 closing because: pgbouncer cannot connect to server (age=0) 
2017-08-03 15:23:33.430 2360 WARNING C-00EA8FE0: postgres/postgres@[::1]:54985 Pooler Error: pgbouncer cannot connect to server 
Vao Tsun
  • 47,234
  • 13
  • 100
  • 132
unknown user
  • 91
  • 1
  • 4
  • `pgbouncer` can't connect and other client (eg `psql`) can?.. – Vao Tsun Aug 03 '17 at 09:40
  • yep.... you can connect it with psql. please take a look on following link http://technobytz.com/install-configure-pgbouncer-pooling-in-postgresql-1.html – unknown user Aug 03 '17 at 10:01
  • what's that link?.. If boucer fails to connect because of postgres - postgres.log will have detail - please share – Vao Tsun Aug 03 '17 at 10:09
  • postgres log file is empty..... but pgbouncer log file has error 2017-08-03 15:23:33.429 2360 LOG C-00EA8FE0: postgres/postgres@[::1]:54985 login attempt: db=postgres user=postgres tls=no 2017-08-03 15:23:33.429 2360 LOG C-00EA8FE0: postgres/postgres@[::1]:54985 closing because: pgbouncer cannot connect to server (age=0) 2017-08-03 15:23:33.430 2360 WARNING C-00EA8FE0: postgres/postgres@[::1]:54985 Pooler Error: pgbouncer cannot connect to server – unknown user Aug 03 '17 at 10:24
  • whats the output of `psql -h 127.0.0.1 -p 4851 -U postgres -d postgres` and `psql -h 127.0.0.1 -p 6432 -U postgres -d postgres`?.. – Vao Tsun Oct 13 '17 at 08:48
  • @unknownuser: did you ever get this to work? I have a similar question posted here: https://dba.stackexchange.com/questions/188526/how-to-successfully-connect-postgresql-9-6-5-to-pgbouncer-1-7-2 – Hassan Baig Oct 16 '17 at 16:07
  • If postgresql log is empty (Assuming you have enabled connect logging) that means that it's not even getting to the point to connect to the server, then it means it's a local issue . I think you have issues with ipv6 here, you seem to be connecting using localhost(ipv6). – Glenn Plas Oct 22 '17 at 17:28

0 Answers0