Using springBoot with version 2.0.0.M6 and redis.clients:jedis:2.9.0,with config:
spring:
redis:
sentinel:
nodes: 0.0.0.0:26379,0.0.0.0:26479,0.0.0.0:26579
master: mymaster
But Spring Boot not use sentinel config,but resolve to localhost:6379.By debugging I found the above code is the cause: If the pool configuration is leave out,Spring Boot will resolve to localhost:6379
@mp911de Can you offer your opinion on this one please? It looks like Spring Data Redis allows a JedisConnectionFactory to be created with client configuration that means that the accompanying sentinel configuration is ignored. Is that intentional?
There are two things to this issue which is a regression bug:
JedisClientConfiguration. JedisClientConfiguration requires explicit pooling activation, which plays into the cause.JedisClientConfiguration, we lost the default in Spring Boot that applied pooling even when spring.redis.jedis.pool properties were not set.I filed DATAREDIS-765 to address the issue on our side. We should prevent falling back to localhost connections.
Thanks, Mark. I'm watching DATAREDIS-765 now. If you go with the "configure the pool with defaults" option, it sounds like a change in Boot won't be necessary. I'll keep this one open until that decision's been made.
It looks like this has been fixed entirely on the Data Redis side of things. We'll pick this up in the next Spring Data Kay service release. @mp911de do you have any plans for SR4 at the moment?
Nothing scheduled yet. Releasing Kay SR4 would make sense right before Spring Boot RC2.
The issue is fixed in Spring Data Redis entirely.