-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unhandled error event: Error: getaddrinfo ENOTFOUND - AWS ElasticCache #1576
Comments
Try connecting using the redis:// protocol instead:
|
Just FYI, this works for me if I use add those options. const pubRedisClient = new Redis(
parseRedisCredentials(process.env.REDIS_CONNECTION ?? 'redis://localhost:6379', {
lazyConnect: true,
connectTimeout: 15000,
retryStrategy: (times) => Math.min(times * 30, 1000),
reconnectOnError(error) {
const targetErrors = [/READONLY/, /ETIMEDOUT/];
logger.warn(`Redis connection error: ${error.message}`, error);
return targetErrors.some((targetError) => targetError.test(error.message));
},
}),
); |
Try setting |
@richiejp thank you!!! This helped me out 😄 |
I'm having the same problem connecting to an IPV6 Redis instance.
I thought this was a bug on Insanely, I still can't connect using the Is there any chance for the pull request #1607 to be merged? |
thanks @richiejp ! In my case fly io was also working only with family: 6. |
For anyone who may concern, you can also append the |
Nothing helps :( |
@Warxcell same :') |
Any update here ? I am stuck in the same problem |
// Connect to 127.0.0.1:6380, db 4, using password "authpassword": https://ioredis.readthedocs.io/en/stable/README/ a yo. |
Adding redis:// protocol worked for me. It works fine on local machine as well as on ec2 server |
I had the same error, I solved with this replacing the host name with corresponding ip address |
Any updates on this? |
Hope it helps someone here. We were facing a similar issue and this answer from Stack Overflow worked well for us - https://stackoverflow.com/questions/76409668/how-to-connect-to-amazon-memorydb-for-redis-from-node-running-in-ec2-ecs |
It seems that the |
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 });
The text was updated successfully, but these errors were encountered: