9 months 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?
ⓘ Deployment information is only viewable by project members and Railway employees.
6 Replies
9 months 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.
9 months 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.
7 months 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?
7 months 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?
Status changed to Closed brody • 7 months ago