Cannot connect to internal database url
kbarralon
PROOP

a year ago

I'm not able to connect to the Postgres database with de DATABASE_URL environment variable while my services are in the same project (web + Postgres).

django.db.utils.OperationalError: could not translate host name "postgres.railway.internal" to address: Name or service not known

I should not need to use the public database I guess as I don't call it externally?

View Deploy details

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

Closed

6 Replies

a year ago

Are you attempting to connect locally?


kbarralon
PROOP

a year ago

No, I want to deploy my web service with the Postgres service in the same Railway project. But my web service can't connect to Postgres as it does not resolve the internal database url.


kbarralon
PROOP

a year ago

Are you attempting to connect locally?

I confirm it works with the DATABASE_PUBLIC_URL but I can't connect my two services from the internal URL while in the same project.


a year ago

I have the same problem. One project, two services: django and postres. It works fine using DATABASE_URL but not if I try DATABASE_INTERNAL_URL. The error is the same: could not translate host name "postgres.railway.internal"
So, did you solve the problem?


sbdev1
HOBBY

a year ago

same thing.. unable to connect two services inside the same project using the internal url. can someone assist pls.. what could be the problem?


a year ago

Please open your own threads.


Status changed to Closed brody over 1 year ago


Loading...