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

2 years 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?

9 Replies

Anonymous
TRIALOP

2 years ago

f0ab4608-eb94-44bb-ba1e-1bb688cba167


Anonymous
TRIALOP

2 years ago

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


Anonymous
TRIALOP

2 years 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?


Anonymous
TRIALOP

2 years 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)


Anonymous
TRIALOP

2 years 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
EMPLOYEE

2 years ago

simply add a 3 second sleep before your app starts


Anonymous
TRIALOP

2 years ago

lemme try that


jackculpan
PRO

2 years ago

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


brody
EMPLOYEE

2 years ago


Loading...