Ruby: Redis client can't connect via internal Redis URL

My Ruby on Rails app isn't able to connect to the Redis service anymore after switching to the private URL. Could I be missing anything in the configuration?
8 Replies
Percy
Percy10mo ago
Project ID: f0ab4608-eb94-44bb-ba1e-1bb688cba167
deooptimo
deooptimoOP10mo ago
f0ab4608-eb94-44bb-ba1e-1bb688cba167 error message:
getaddrinfo: nodename nor servname provided, or not known
getaddrinfo: nodename nor servname provided, or not known
might be the case that the underlying DNS resolver is trying to find the redis.railway.internal on the public DNS but can't? anything i need to do in my container configuration to make it work?
deooptimo
deooptimoOP10mo ago
looks like private networking isn't getting configured properly in my container. how do i do that? i tried ENABLE_ALPINE_PRIVATE_NETWORKING but didn't work since my base image is ruby3.3-slim-bullseye (https://github.com/docker-library/ruby/blob/52e176c1dee983d991d9cff0c6371f5c50bfd636/3.3/slim-bullseye/Dockerfile)
GitHub
ruby/3.3/slim-bullseye/Dockerfile at 52e176c1dee983d991d9cff0c6371f...
Docker Official Image packaging for Ruby. Contribute to docker-library/ruby development by creating an account on GitHub.
deooptimo
deooptimoOP10mo ago
if i were to update the dns resolver, which address should i use so that railway is able to do private networking? thanks!
Brody
Brody10mo ago
simply add a 3 second sleep before your app starts
deooptimo
deooptimoOP10mo ago
lemme try that
Jack
Jack8mo ago
could you please share some code on how that is best done?
Want results from more Discord servers?
Add your server