It works fine if my fly app connects to redis, but I get this error on my local machine:
[ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND fly-autumn-sun-6838.upstash.io
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
I am using ioredis
in node.js v19 environment on my local machine to test things out.
I have read some posts and it looks like above node v18, I need to set the connection to IPv6, so I did set the family: 6
:
import IORedis from 'ioredis'
const redis = new IORedis("redis://default:secret@fly-autumn-sun-6838.upstash.io:6379", { family: 6 })
But for all cases it generates the same error. maybe I need to whitelist my local IP somewhere? because it works for other redis connections(redis cloud). But I dont see anything about this in the fly dashboard