I’m playing around with porting a Node.js app that I’ve had running on Heroku for a bunch of years over to fly.io. One of the dependencies is Redis, and I’m trying to use the managed Redis from upstash that’s in public beta. I grabbed the Private URL from
fly redis status ... and then set it as a secret which is pulled into my app as an env var and passed into the node-redis client creation. I get the following error when the client tries to connect:
Error: getaddrinfo ENOTFOUND fly-pigskin-redis.upstash.io
I printed out the Redis client config options that get passed into the client, and the URL it’s using looks right. I saw on a different post about connecting to a non-upstash Redis instance on fly that it might be an ipv6 thing, and to try the
family: 6 config option during redis client creation. I tried that also. The docs are here.
I also changed my Dockerfile command to ping the same hostname and see if it can resolve, and it does.
fly redis connect also works fine. Any ideas what I might be missing?