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

AnonymousTRIAL

a year ago

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?

0 Replies

AnonymousTRIAL

a year ago

f0ab4608-eb94-44bb-ba1e-1bb688cba167


AnonymousTRIAL

a year ago

error message:
getaddrinfo: nodename nor servname provided, or not known


AnonymousTRIAL

a year ago

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?


AnonymousTRIAL

a year 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)


AnonymousTRIAL

a year ago

if i were to update the dns resolver, which address should i use so that railway is able to do private networking? thanks!


a year ago

simply add a 3 second sleep before your app starts


AnonymousTRIAL

a year ago

lemme try that


jackculpanPRO

a year ago

could you please share some code on how that is best done?


a year ago


Ruby: Redis client can't connect via internal Redis URL - Railway Help Station