Hi All,
I tried to setup my nodejs app on fly,io and seems okay. However, the node instance is unable to connect to the managed redis. The node app itself runs on port: 4000
and redis:6379
. I’ve tried a few things already.
Any thoughts on how to resolve this?
REDIS_URL=redis://some_user:some_pass@fly-fc-redis.upstash.io:6379/
// connection
const subscriber = new Redis(process.env.REDIS_URL, {
family: 6,
retry_strategy: (options) => Math.min(options.attempt * 100, 3000),
});
const redisInstance = subscriber.duplicate();
const publisher = new Redis(process.env.REDIS_URL, { family: 6 });
// error
2023-02-20T19:37:58Z [info][20/02/2023 19:37:58.054] [ERROR] Error: getaddrinfo ENOTFOUND fly-fc-redis.upstash.io
2023-02-20T19:37:58Z [info] at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26)
2023-02-20T19:37:58Z [info] at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17)