ioredis: Unhandled error event: Error: getaddrinfo ENOTFOUND - AWS ElasticCache
Hey guys, did anyone have some issue like that to connect in the AWS ElasticCache in the ECS Container?
[ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND cursobeta-dev-elasticache-redis.ilg7lv.ng.0001.use1.cache.amazonaws.com
Looks like permision, right?
const pubClient = new Redis({ host: process.env.AWS_REDIS_HOST, port: 6379 });
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 15
Try setting
family: 6; for some reason ioredis defaults tofamily: 4and AWS may be using (only) IPv6. Note I had the same issue on fly.io.For anyone who may concern, you can also append the
family=6option to the redis URL (if you canโt addfamily:6). For example, it should changeredis://domain:6379toredis://domain:6379/?family=6.Nothing helps ๐ฆ
Any update here ? I am stuck in the same problem
thanks @richiejp ! In my case fly io was also working only with family: 6.
@richiejp thank you!!! This helped me out ๐
Just FYI, this works for me if I use add those options.