unable to use internal connection
sbdev1
HOBBYOP

a year ago

hello, i am unable to reuse internal url so my servers in the same project can interact with each other without incurring egress charges. my public url connection works between redis worker - redis servers but internal does not, i tried every possible way. i see other similar threads. Support, can you assist with clues?

this is the deployment log:

Redis connection error: Error: getaddrinfo ENOTFOUND redis.railway.internal

Nov 23 00:49:08

at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {

Nov 23 00:49:08

errno: -3007,

Nov 23 00:49:08

code: 'ENOTFOUND',

Nov 23 00:49:08

syscall: 'getaddrinfo',

Nov 23 00:49:08

hostname: 'redis.railway.internal'

Nov 23 00:49:08

}

Solved

5 Replies

a year ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody over 1 year ago


a year ago

I think this docs section would help you -

https://docs.railway.com/guides/private-networking#ioredis


sbdev1
HOBBYOP

a year ago

Thank you brody. May I please ask you to clarify, i can see where you are pointing me: const redis = new Redis(process.env.REDIS_URL + '?family=0'); - this line. however, for internal comms, i need to set env variables in railway app itself, dont I? like so:

REDIS_HOST

*******

REDIS_PORT

*******

REDIS_TOKEN

*******

REDISUSER

*******

so in this contexct, how do i specify the + '?family=0'); part? or do I create env and env.local and will my env override the env setup in railway app ?


a year ago

family = 0 can be done in code.


sbdev1
HOBBYOP

a year ago

that did it. thank you very much brody. appreciate your prompt help.


a year ago

No problem!


Status changed to Solved brody over 1 year ago


Loading...