PostgreeSQL in Neon.tech - could not connect to server: Network is unreachable
mcamps2000
TRIALOP

2 years ago

I'm executing a very simple Django project to learn code. This code uses a PostgreeSQL database hosted in Neon.tech platform.

Executed locally it works but when I deploy it in Railway I always get the following error:

---------------

django.db.utils.OperationalError: connection is bad: could not connect to server: Network is unreachable

Is the server running on host "2600:1f14:3392:6b13:6fd4:8b4:96f:e269" and accepting

TCP/IP connections on port 5432?

---------------

It works if I change the database configuration to sqlite3. There is some problem to connect to neon.tech PostgreeSQL using Railway.app?

3 Replies

2 years ago

Are you sure you are using the correct credentials?


mcamps2000
TRIALOP

2 years ago

Yes, I have the same connection and credential data in both environments. The error "could not connect to server: Network is unreachable" looks like a network problem.

I'm using this connection: "postgresql://****:******@ep-tight-bush-a6vced3w.us-west-2.aws.neon.tech/neondb?sslmode=require".

Are there some firewall rules in Railway.app blocking external connections? Where can I found them?


2 years ago

Railway does not put users apps behind a firewall.

This could be neon blocking the request, you would need to get in contact with them on this matter.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...