Re: Pgbouncer connection timed out

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux