Flask to Postgres Private Network: Could not translate hostname postgres.railway.internal

mattcaruso
HOBBY

9 months ago

I've got a simple project with 2 services: A Flask app and a Postgres database. Private network is turned on for both. The Flask app can interact with the database over the public network URL.

However, when I disable the public network and use the private database URL in the Flask app to access the database, I get the Could not translate hostname postgres.railway.internal error.

What else could I be missing as to why my one service can't talk over the private network?

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

4 Replies

9 months ago

You where on the Legacy Runtime, we have since introduced a Runtime V2 that fixes these issues, and I have moved your service config over to that new Runtime, please push a commit so that your next deploy uses the V2 Runtime.


braimbau
HOBBY

9 months ago

Hi,

I have the same error. can I have the new runtime too ?

thank you


9 months ago

That error does not always mean you are on the old runtime, please open your own thread so I can assess your situation.


9 months ago

Closing this out since mattcaruso's latest deploy is now on the V2 Runtime without any errors!


Flask to Postgres Private Network: Could not translate hostname postgres.railway.internal - Railway Help Station