a year ago
I'm trying to spin up a docker image that will connect to a postgres service, but it won't connect successfully over the private network, I have to use a public url and port. The database should never be accessed outside of the docker service so I'd rather not having the extra latency or bandwidth.
32 Replies
a year ago
can you elaborate more on why it didn't work with the private network, what kind of error occurred?
> [error] 2025-03-06 20:01:33.318 Postgrex.Protocol (#PID<0.3343.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (postgres.railway.internal:5432): non-existing domain - :nxdomain pid=<0.3343.0>
a year ago
Is this from the build or deploy logs?
a year ago
what env?
you'll have to look at previous deployments, in order to progress, I used a public domain for now
a year ago
what environment
a year ago
what language?
it's not our codebase or anything. It's a docker image that has some commercial software
a year ago
is it oss?
a year ago
its elixir
a year ago
try setting a service variable ERL_AFLAGS="-proto_dist inet6_tcp"
seems to at least change the response:
postgres.railway.internal:40141 - no response
Thu Mar 6 10:54:25 PM UTC 2025 - waiting for database to start
a year ago
try ECTO_IPV6=true
a year ago
then you will need to get in contact with the maintainers of that software and ask them how to make the postgres connection work with ipv6
a year ago
yeah
a year ago
there is not
a year ago
no problem
a year ago
!s
Status changed to Solved brody • about 1 year ago