Postgres TLS suddenly not working

Hey folks,

Prior to this evening, I have been able to connect to my Fly-hosted postgres database externally using “.fly.dev”, using TLS.

Now, when attempting to connect to this database, I am now receiving the following error:

psql: error: connection to server at "<my-db-name>.fly.dev" (<my-db-ip>), port 5432 failed: SSL SYSCALL error: EOF detected

I am able to successfully connect if I set sslmode=disable. However, this is not a workaround I want to use in production, as I’d prefer any external connections to be encrypted (though I am aware that MITM could still be possible)

For context, here is my fly services list output:

Services
PROTOCOL        PORTS           HANDLERS        FORCE HTTPS     PROCESS GROUP   REGIONS MACHINES
TCP             5432 => 5432    [PG_TLS]        False           app             iad     1
TCP             5433 => 5433    [PG_TLS]        False           app             iad     1
2 Likes

I’m experiencing similar issues, but sslmode=disable doesn’t seem to have any effect for me. The problem started at 10:00 PM UTC.

I’ve tried re-deploying, restarting the machines, upgrading the image, and assigning a new IPv4 address. I’ve also confirmed that connecting locally on the machine works without any issues.

Hi - we’re also seeing this issue. Any update from the fly team?

Same issue. Our production environment is down

Thanks for this tip, worked for me.

Needless to say, we’re also experiencing this issue. Luckily, we don’t connect externally to the DB’s except using my local DB client which suddenly didn’t work this morning.

Yikes, sorry to hear this is spreading… As a side note, flyctl proxy is usually a much better choice if you just want to connect a desktop GUI, etc.

(That way you don’t have to give up encryption, :dragon:.)

Just leave it running in its own terminal for as long as you need the connection.

There is also WireGuard, for people who need something more persistent.

1 Like

Hey folks,

we are looking into this.

2 Likes

Hi, This broke our app since the last 7 hours. We have an external service trying to connect to our Postgres

connection to server at "abcd.fly.dev" (123.xx.xx.xx), port 5432 failed: SSL SYSCALL error: EOF detected
1 Like

As of this morning, I am no longer encountering this issue. Thanks for the quick turnaround @pavel.

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