Skip to content
Postgres TCP proxy refuses connections (private networking works)
shopology
OP

4 hours ago

My Postgres service (template ghcr.io/railwayapp-templates/postgres-ssl:18) is Active and works over private networking. My app connects to it fine at postgres.railway.internal. But the public TCP proxy refuses every connection.

What I've tried:

I've deleted and recreated the TCP proxy twice, once after moving the service from US West to EU West Metal. All three proxy addresses fail.

Redeployed the Postgres service: still fails.

All three addresses resolve to 159.100.251.128. Ping replies, but TCP to the proxy port fails.

I've ruled out my side. The same failure happens on my home broadband and on a mobile hotspot. A public port test server on the same port connects fine from the same PC, and my firewall logs show the connection allowed.

Logs after the redeploy show Postgres listening on 0.0.0.0:5432 and "ready to accept connections", so the service itself is up.

This looks like it could be left over from incident QBCLHG1V (external network blocks on Railway IPs). I'm in the UK, and the failure happens on both my home broadband and my mobile network. A firewall and threat protection pause on my PC made no difference.

Is the TCP proxy for this service broken, or is 159.100.251.128 still blocked by UK networks? Also, should the proxy still resolve to the same IP after the service moved to EU West?

Awaiting Conductor Response$40 Bounty

4 Replies

Railway
BOT

4 hours ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • about 4 hours ago


kushagra290805-commits

4 hours ago

For immediate database access, try railway connect --ssh from the linked Railway environment, then run SELECT 1; in psql. This uses Railway’s SSH tunnel while the public proxy is being investigated.

The repeated 159.100.251.128 result alone can’t tell you which region serves Postgres. In Settings → Networking, confirm that the current proxy targets 5432 and copy its assigned public hostname and port. Your private connection already confirms Postgres is listening.

The most useful remaining check is one connection to that exact endpoint from a machine you control outside the UK. Does it connect, time out, or immediately report Connection refused? Give Railway support the endpoint, UTC timestamps, and exact errors from that test and one UK attempt. That comparison lets them check the current proxy mapping and investigate a network-specific failure without another redeploy.

I used AI to help prepare this reply.


kushagra290805-commits

For immediate database access, try railway connect <service-name> --ssh from the linked Railway environment, then run SELECT 1; in psql. This uses Railway’s SSH tunnel while the public proxy is being investigated. The repeated 159.100.251.128 result alone can’t tell you which region serves Postgres. In Settings → Networking, confirm that the current proxy targets 5432 and copy its assigned public hostname and port. Your private connection already confirms Postgres is listening. The most useful remaining check is one connection to that exact endpoint from a machine you control outside the UK. Does it connect, time out, or immediately report Connection refused? Give Railway support the endpoint, UTC timestamps, and exact errors from that test and one UK attempt. That comparison lets them check the current proxy mapping and investigate a network-specific failure without another redeploy. I used AI to help prepare this reply.

shopology
OP

3 hours ago

Thanks. Tested 2 December, 09:03 UTC, from outside the UK via portchecker.co: the current proxy endpoint is OPEN. The same endpoint times out from my UK home broadband (08:07 UTC) and from a UK mobile hotspot, with ping to 159.100.251.128 succeeding on broadband. So the proxy works and 159.100.251.128 appears still blocked on UK networks, as in incident QBCLHG1V. Can Railway raise this with UK network operators, or assign the proxy a different IP?


The IP your addresses resolve to seems incorrect; it should resolve to 66.33.22.x, so something must be wrong with your DNS resolver. I suggest you set your DNS resolver to 1.1.1.1, and try again.


darseen

The IP your addresses resolve to seems incorrect; it should resolve to `66.33.22.x`, so something must be wrong with your DNS resolver. I suggest you set your DNS resolver to `1.1.1.1`, and try again.

shopology
OP

3 hours ago

Confirmed, thanks. My broadband provider's DNS was returning 159.100.251.128. Switching to 1.1.1.1 fixed it.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...