Hello,
Hello,
I'm attempting to connect NeonDB to the PgBouncer Docker image (edoburu/pgbouncer). However, when I try to connect using pgAdmin, I encounter the following error:
Unable to connect to server: connection failed: FATAL: Endpoint ID is not specified. Either please upgrade the postgres client library (libpq) for SNI support or pass the endpoint ID (first part of the domain name) as a parameter: '?options=endpoint%3D<endpoint-id>'. See more at https://neon.tech/sni
I tried adding the endpoint ID as follows:
Python
conn = psycopg2.connect(
host="localhost",
port="6432",
dbname="orders",
user="xxxxx",
password="xxxxxx",
options=f'-c endpoint={endpoint_id}'
)
But I receive this error instead:
Error: connection to server at "localhost" (127.0.0.1), port 6432 failed: FATAL: unsupported startup parameter in options: endpoint
Does anyone know how to resolve this issue?3 Replies
mute-gold•15mo ago
Hey 👋🏻
Seems like you're using localhost while you'd need to obtain the params from the Neon console after you've created a project to use Neon.
zesty-coffee•15mo ago
I added Neon DB Credentials in a pgbouncer docker-compose file. and try to connect pgbouncer.
Hi @Rishi Raj Jain any solution for the above?
Here is the docker-compose file
version: '3.8'
services:
pgbouncer:
image: edoburu/pgbouncer
environment:
DATABASE_URL: "postgresql://xxxxxxx:xxxxxxxxx@ep-long-tree-a5szmpk2-pooler.us-east-2.aws.neon.tech/orders"
volumes:
- ./pgbouncer.ini:/etc/pgbouncer/pgbouncer.ini
- ./userlist.txt:/etc/pgbouncer/userlist.txt
ports:
- "6432:6432"
restart: always
conscious-sapphire•15mo ago
Look at the
host=localhost
parameter in your connect call