Redis connection problem
namrastanov
HOBBYOP

2 months ago

Hello. Could someone please help me with the error:
getaddrinfo ENOTFOUND redis.railway.internal at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:111:26) { errno: -3007, code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'redis.railway.internal' }

I have node.js service and it tries to connect to the redis service I've added. On the redis settings it says that: redis.railway.internal IPv6 Ready to talk privately. You can also simply call me redis.

I've attached the image.. I use the predefined variable from the redis service.

Solved

0 Replies

uxuz
MODERATOR

2 months ago

Hey, have you tried to follow the docs regarding this error, especially the part of specifying the family attribute? Railway also has IPv4 private networking, however, this is currently locked behind a feature flag that can be activated at https://railway.com/account/feature-flags.


namrastanov
HOBBYOP

2 months ago

@uxuz thank you! I've added family: 0 and now have different error:
[ioredis] Unhandled error event: Error: connect ECONNREFUSED fd12:575:4ad7:0:1000:13:74e9:3179 at TCPConnectWrap.afterConnect as oncomplete

redis password and username are correct.

And then I've enabled IPv4 feature flag, removed family: 0 but got back the initial error.. Do we have some kind of timeout for feature flags or need to do some additional action to have IPv4 work? I've redeployed redis just in case, but in settings of redis I still see IPv6 tag as well.

Sorry, if there are ready answers somewhere in the docs, couldn't find.


uxuz
MODERATOR

2 months ago

IPv4 and IPv6 should be displayed within the private networking settings, I have attached a screenshot to illustrate what I have just said, you may need to redeploy, I only have both on newly created services as opposed to the ones I already have. As much as I am aware, there were some problems with IPv4, so I would still recommend to use IPv6 and the family attribute if that's possible.

1421566876709945300


namrastanov
HOBBYOP

2 months ago

Thank you. I got back family: 0. There were port incorrection I fixed. Works as expected now with IPv6. <:salute_guy:1244814929630855188>


uxuz
MODERATOR

2 months ago

That's great, I'll mark this thread as solved!


uxuz
MODERATOR

2 months ago

!s


Status changed to Solved uxuz 2 months ago


Loading...