0
votes

Hi I am trying to connect to a redis server listening on port 6379 on AWS EC2 linux server.

container.Register<IRedisClientsManager>(c => new PooledRedisClientManager(new[] {"XX.XXX.XX.XXX:6379"})); 

I performed following steps , created a inbound rule as Custom TCP allowing 6379 port ,and changing redis.conf bind to XX.XXX.XX.XXX:6379 or 0.0.0.0 but still unable to connect to server , can anyone help.

Here is my inbound rule on AWS

Custom TCP Rule TCP 6379 0.0.0.0/0
1
You are trying to connect to the Redis from EC2 Instance or from your local machine? - error2007s
Can you make sure it's an external IP and not an internal IP? Try using the public DNS entry for the instance listed in the details on the EC2 AWS console. Could you also paste your exact /etc/redis/redis.conf with bind 0.0.0.0 entry just to make sure? - Darren Reid
What @Layoric said, or just use AWS ElastiCache - it's super simple to set up, link to existing EC2 architecture and maintain(Amazon does it for you for the most part) plus it gives you the choice between Redis and MemCached! - Aayush Kothari
@error2007s Yes am trying to connect to Redis onEC2 instance from my local machine. - Tech Cruize
@Layoric sorry i didnt get your point on "make sure its an external IP and not internal IP".? is it a check done on AWS side..? - Tech Cruize

1 Answers

1
votes

Enable telnet on your local machine. Run: telnet XX.XXX.XX.XXX 6379

ensure that the IP you are trying to connect to is accessible from your machine.

ensure that redis is configured properly to connect on the public IP