TCP Proxy for PostgreSQL not accepting connections - Connection timeout

alexbrazilec
PROOP

a month ago

Hello Railway Support Team,

I'm experiencing issues with TCP Proxy connectivity to my PostgreSQL database and need assistance.

Project Details:

Problem Description: I configured TCP Proxy for my PostgreSQL service to access it from outside Railway network, but all connection attempts fail with "connection timeout expired" error.

Steps I've taken:

  1. Created TCP Proxy in Settings → Networking for PostgreSQL service

  2. Generated domain: postgres-production-1337.up.railway.app

  3. Deployed the changes (the deployment completed successfully)

  4. Waited 10+ minutes for TCP Proxy to activate

  5. Attempted connections using multiple PostgreSQL clients (psql, pgAdmin 4) with correct credentials

Connection parameters used:

Error received:

psql: error: connection to server at "postgres-production-1337.up.railway.app" (66.33.22.56), port 5432 failed: Operation timed out
Is the server running on that host and accepting TCP/IP connections?

Additional context: The TCP Proxy appears configured correctly in the Railway dashboard, showing the domain and port 5432. However, no external connections can reach the database. Internal connections within Railway network work fine (my n8n service can connect using postgres.railway.internal).

What I need: I need to access the PostgreSQL database externally to run a SQL command (DELETE FROM "user";) to reset n8n user accounts, as I've lost access to the n8n admin panel.

Could you please:

  1. Check if TCP Proxy is properly activated for my PostgreSQL service

  2. Verify if there are any firewall or network issues blocking connections

  3. Suggest alternative methods to access the database if TCP Proxy cannot be fixed

Thank you for your assistance!

Solved$10 Bounty

2 Replies


a month ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody about 1 month ago


Hi!

Easy fix! Remove the generated domain you created and add a TCP proxy. This is how Postgres will communicate. Make sure to point it to 5432.

EDIT: I noticed you said you created one, but the URL you're using to connect isn't it. Try removing both and recreating a TCP one.


Status changed to Solved samgordon 16 days ago


Loading...