Reputation: 929
I have a VPC with 2 public subnets in different availability zones (public subnet-2a and public-subnet-2b). I have two private subnets (private-2a-EB-Instance, private-2b-EB-Instance), and two other private subnets for Elasticache (private-2a-EB-Instance, private-2b-EB-Instance), these two subnets for elasticache are part of a subnet group that I use when creating my Elasticache clusters.
I have create a security group for my ElastiCache(redis) and I have changed its inbound rules so it can accept connection from the security group of my ElasticBeanstalk environment. Didn't solve the problem.
I have followed the instructions on AWS' website, and I can't get it to work. I wonder what I am doing wrong. I am using socket-io-redis and I am wondering if that may be part of the problem.
I have used the .config file offered here , but I get an error when deploying the app. It says there was an error creating it.
I created the cluster from the console and tried to connect it to my EB app using the "Primary Endpoint", but I get the error:
Error: Redis connection to https://myelasticache.xxxxxxxxx.cache.amazonaws.com:6379 failed - getaddrinfo ENOTFOUND https://myelasticache.xxxxxxxxx.cache.amazonaws.com
What am I doing wrong? What am I missing?
Upvotes: 2
Views: 1290
Reputation: 3044
I think the problem is that you have included https://
in what is supposed to be the hostname. Redis does not connect over HTTP, it uses its own protocol. The error message getaddrinfo ENOTFOUND https://myelasticache.xxxxxxxxx.cache.amazonaws.com
indicates that it is trying to resolve https://myelasticache.xxxxxxxxx.cache.amazonaws.com
when you want it to use myelasticache.xxxxxxxxx.cache.amazonaws.com
.
So try removing https://
and see if it works or if you get another error.
Upvotes: 3