Re: Pgbouncer connection timed out

From: Priancka Chatz <pc9926(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Pgbouncer connection timed out
Date: 2024-04-29 13:43:40
Message-ID: CANnOdgZ69ACOZPf+h3g7+697_8dX23bEL+yaK8u4jYWR5EN2ew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

P.s: Database name is exttest and same is mentioned in config and
connection string. Above mentions are an error from copying.

On Mon, 29 Apr 2024 at 3:33 PM, Priancka Chatz <pc9926(at)gmail(dot)com> wrote:

> Hi Pgsql-Admins,
>
> I am trying to install pgbouncer on a linux machine to connect to a
> database on a different server.
> Below are my config files:
>
> pgbouncer.ini :
>
> [databases]
> test = host=<host endpoint> port=5432 dbname=test user=bounce
>
> [pgbouncer]
> listen_addr = *
> listen_port = 6433
> auth_type = scram-sha-256
> auth_file = /etc/pgbouncer/userlist.txt
> pool_mode = session
> max_client_conn = 100
> default_pool_size = 20
> logfile = /var/log/postgresql/pgbouncer.log
> pidfile = /var/run/postgresql/pgbouncer.pid
>
>
> userlist.txt :
> "bounce" "password"
> (I have tried giving both: plain text password, scram-sha-256 encrypted
> password)
>
> Psql from the remote client machine works fine:
> psql -h <host-endpoint> -p 5432 -d ttest -U bounce
> Password for user bounce:
> psql (16.2 (Ubuntu 16.2-1ubuntu4), server 15.2 (Ubuntu 15.2-1.pgdg22.04+1))
>
> But for port 6433 it fails:
>
> psql -h <host-endpoint> -p 6433 -d exttest -U bounce
> psql: error: connection to server at "<host-endpoint>" (xxx.xxx.xxx.xxx),
> port 6433 failed: Connection timed out
> Is the server running on that host and accepting TCP/IP connections?
>
> I tried using the same ini and userlist entries locally on the server and
> changing only host=localhost and it works fine.
>
> What am I missing here? What should I change or check to connect using
> pgbouncer from a remote client host?
>
> Thanks in advance.
>
> Regards,
> Priyanka
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Priancka Chatz 2024-04-29 14:23:42 Re: Pgbouncer connection timed out
Previous Message Priancka Chatz 2024-04-29 13:33:21 Pgbouncer connection timed out