How to configure ElastiCache Redis for Spring Data Access -


i trying setup elasticache use java application. have based setup based on documentation: https://docs.aws.amazon.com/amazonelasticache/latest/userguide/bestpractices.html

the ec2 instance java (8) app runs in vpc. have tried elasticache instance both in vpc , no vpc. however, got,

redis.clients.jedis.exceptions.jedisconnectionexception: java.net.connectexception: connection refused 

if install redis myself on ec2 instance , connect it, app able connect redis cache!

i have setup proper authorization security-group ec2 cache-security no luck. can't make 'connection'. sample connection snippet helpful.

redis setup way in app config:

    @bean     public jedisconnectionfactory redisconnectionfactory() {     jedisconnectionfactory redisconnectionfactory = new jedisconnectionfactory();     redisconnectionfactory.sethostname(<cache-node>);     redisconnectionfactory.setport(6397);     redisconnectionfactory.setusepool(true);     redisconnectionfactory.settimeout(3600);     return redisconnectionfactory;    } 

the various versions:

jedis- 2.6.2, spring- 4.1.6, spring-data-> 1.5.0 

redisconnectionfactory.setport(6397); 

should be

redisconnectionfactory.setport(6379); //default redis port 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -