Error connecting to postgresql serverless service

I’m having trouble trying to connect to the postgresql serverless instance i created using the free tier service.

The first errors I encountered were related to the fact i was not passing in the connection string the sslmode or the endpoint id using “options”.

Following the troubleshooting documentation I was able to correct those previous errors but now I am receiving an error related to an incorrect password. Which kinda puzzles me as I am using the information provided by the database connection web panel.

This is the command I have been using:

psql -h [endpoint-id].c-3.us-east-1.pg.koyeb.app -p 5432 -U demo -d “dbname=demodb sslmode=require options=endpoint=[endpoint-id]”

After that I get prompted to input the password. But no luck. I just get:

ERROR: password authentication failed for user [user]

I have also tried to connect using pgadmin both desktop or web version.

Could you help me with this?

Just wanted to note that I’m having this same issue, too. On a lark, I tried starting up the free database from scratch to make sure it wasn’t something I had flubbed.

psql -h [endpoint-id].c-3.us-east-1.pg.koyeb.app -U koyeb-adm -d “dbname=koyebdb sslmode=require options=endpoint=[endpoint-id]”

psql: error: connection to server at “[endpoint-id].c-3.us-east-1.pg.koyeb.app” (35.171.11.169), port 5432 failed: ERROR: password authentication failed for user 'koyeb-adm’

I even tried typing the password out by hand instead of copy-pasting to see if it was that, but no luck.

1 Like

I’m having the same issue. I’ve tried 100 different ways and can’t seem to get this to work. It’s possible I’m missing something still but this really seems like a bug.

Folks, I apologize for a late answer. We’ve identified the problem, and it should be resolved now.

Hi @Lukasz_Oles - I’m getting the same issue. Both my server and db services were deployed ok yesterday, but today, was getting “error: Endpoint ID is not specified.” If I try to add the “?options=endpoint%3D”, password authentication fails. This is the same situation for the other options in this document: Connection errors - Neon Docs

Can you kindly assist? Thanks!

1 Like

Yes, same exact issue here! I have set up a free database service but I can’t connect to it in any way. This still persists

It does not appear to be resolved. I am using the credentials provided by the database config.

Caused by:
PG::ConnectionBad: connection to server at "2a05:d014:aa3:7a0a:2022:d2c:7ebc:587b", port 5432 failed: ERROR:  password authentication failed for user 'ruby_app' (PG::ConnectionBad)

I have a similar issue.
I can connect to the host but I always get:

psql: error: connection to server at "{my db}), port 5432 failed: server closed the connection unexpectedly

This probably means the server terminated abnormally before or while processing the request.

The db is not sleeping, the app is working in parallel…

Folks, please try again. It should be working now. Our DB provider made some changes, which required us to update our configuration.

Hi @Lukasz_Oles,
I just tried again but I always run into the same issue:

pg_dump: error: connection to server at "ep-delicate-forest-agvru2cj.c-2.eu-central-1.pg.koyeb.app" (149.248.211.216), port 5432 failed: server closed the connection unexpectedly

	This probably means the server terminated abnormally

	before or while processing the request.

I need to run a larger migration on the DB and would really like to have a backup before. Is there any guidance on how to achieve this please?

Could you please show how you connect exactly? Just replace

the password with stars :slight_smile:

Hi @Lukasz_Oles:
I tried many ways. E.g.:
(It also fails when I use the full DB URL string that I can copy from the UI)

export PGPASSWORD=‚**********‘

psql "host=ep-delicate-forest-agvru2cj.c-2.eu-central-1.pg.koyeb.app port=5432 dbname=multi-language user=koyeb-adm sslmode=require connect_timeout=30" -c "SELECT 1;"

I can connect to the host:

nc -vz ep-delicate-forest-agvru2cj.c-2.eu-central-1.pg.koyeb.app 5432

Connection to ep-delicate-forest-agvru2cj.c-2.eu-central-1.pg.koyeb.app port 5432 [tcp/postgresql] succeeded!

Wait, so the app is working ok and can connect to the db?

Yes, the app and DB work just fine, I just can’t connect to the DB in any other way, e.g. through my terminal. I’d like to do a pg dump before I run a risky migration.

I’m 99% sure that you are trying the wrong password. Check what password you are providing to your app and use the same.

I’ve just tried the same psql command for my DB and it works just fine.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.