Can not connect to Redis internally
argonft
HOBBYOP

a year ago

Hi my deployment can not connect to redis.railway.internal

[ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND redis.railway.internal at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)

Solved$10 Bounty

16 Replies

argonft
HOBBYOP

a year ago

a6120288-cfda-4153-8e0a-fe8a02c364ce


a year ago

Bah da da da dah


a year ago

ioredis!


a year ago

Add ?family=0 to the end of the connection string


argonft
HOBBYOP

a year ago

Alright let me try thanks


argonft
HOBBYOP

a year ago

erm now its trying to connect to 127.0.0.1


argonft
HOBBYOP

a year ago

[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379

at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)

a year ago

Can you share the variable you're using now


argonft
HOBBYOP

a year ago

${{Redis.REDIS_URL}}?family=0


argonft
HOBBYOP

a year ago

i am not sure if i should set ${{Redis.REDIS_URL}}/?family=0 or ${{Redis.REDIS_URL}}?family=0


a year ago

What you have is fine


argonft
HOBBYOP

a year ago

fixed it with using

const redis = new Redis({ host: process.env.REDISHOST, port: process.env.REDISPORT, user: process.env.REDISUSER, password: process.env.REDISPASSWORD, family: 0 })


argonft
HOBBYOP

a year ago

using this in the connection URL did not work for me


a year ago

weird


a year ago

those two things should do the same thing


a year ago

oh well


Status changed to Solved brody 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...