4

I am configuring redis for my application and i am able to sucessfully connect for as single master setup, but when i am trying with sentinel, i am getting the error :Can connect to sentinel, but master-1; seems to be not monitored...

Have checked the redis sentinel configuration where it is firing the command get-master-addr-by-name to fetch the ip and port of all masters, but it is unable to do so

Able to get the result of get-master-addr-by-name through redis-cli where the actual master ip and port is being returned.

XX.XXX.XXX.XXX:27568> SENTINEL get-master-addr-by-name master-1 1) "XX.XXX.XXX.XXX" 2) "7568"

Getting the below stacktrace while starting spring boot

Caused by: redis.clients.jedis.exceptions.JedisException: Can connect to sentinel, but master-1; seems to be not monitored...
    at redis.clients.jedis.JedisSentinelPool.initSentinels(JedisSentinelPool.java:177) ~[jedis-2.9.0.jar:na]
    at redis.clients.jedis.JedisSentinelPool.<init>(JedisSentinelPool.java:95) ~[jedis-2.9.0.jar:na]
    at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.createRedisSentinelPool(JedisConnectionFactory.java:368) ~[spring-data-redis-2.1.8.RELEASE.jar:2.1.8.RELEASE]
    at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.createPool(JedisConnectionFactory.java:352) ~[spring-data-redis-2.1.8.RELEASE.jar:2.1.8.RELEASE]
    at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.afterPropertiesSet(JedisConnectionFactory.java:341) ~[spring-data-redis-2.1.8.RELEASE.jar:2.1.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1837) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE]
    ... 16 common frames omitted
snp
  • 41
  • 5

0 Answers0