unable to connect Redis private URL

Error: getaddrinfo ENOTFOUND redis.railway.internal at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) { errno: -3007, code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'redis.railway.internal' project id: fd3bc524-4fff-4055-af62-1fc7a75accfe
Solution:
try to add a 3 second sleep before you start your app
Jump to solution
8 Replies
Percy
Percy7mo ago
Project ID: fd3bc524-4fff-4055-af62-1fc7a75accfe
Solution
Brody
Brody7mo ago
try to add a 3 second sleep before you start your app
jeremy
jeremy7mo ago
Are you using an url string connection? I had to add ?family=6 at the end with ioredis to work with ipv6 address
Brody
Brody7mo ago
that is a very good point, ioredis assumes ipv4 by default for some reason, but this error comes from a node api and not ioredis, leading me to believe this error is being caused by the internal dns resolver not having started yet (takes ~2 seconds)
ENT3I <3
ENT3I <37mo ago
hey Brody sorry to ask here but since jeremy pointed the ?family=6 I remember you mentioned something similar that ioredis assumes ipv4 (was trying to connect Redis to n8n using private network), does that ?family=6 in the url could help with that? do you remember what I'm talking about?
Brody
Brody7mo ago
I do remember exactly what you are talking about, but to my memory n8n doesn't take a url for its redis connection? edit: I was correct, they take the individual username / password / host / port type variables, so there's no way to pass in family=6 https://docs.n8n.io/hosting/environment-variables/environment-variables/#queues there is this thread, if they implemented what was suggested it would solve our problems https://community.n8n.io/t/allow-ipv6-to-use-redis-with-provider-internal-network/32439
Michael Li
Michael Li7mo ago
@jeremy family=6 works for me. thanks! @Brody the timeout trick does not seem to work for my use case.
Brody
Brody7mo ago
awsome!