You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi i am also facing the same issue.
here is the exception.
[Start of Exception
SEVERE: Lost connection to Sentinel at sentinal server node: portno. Sleeping 5000ms and retrying.
redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:199)
at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40)
at redis.clients.jedis.Protocol.process(Protocol.java:151)
at redis.clients.jedis.Protocol.read(Protocol.java:215)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)
at redis.clients.jedis.Connection.getRawObjectMultiBulkReply(Connection.java:285)
at redis.clients.jedis.JedisPubSub.process(JedisPubSub.java:121)
at redis.clients.jedis.JedisPubSub.proceed(JedisPubSub.java:115)
at redis.clients.jedis.Jedis.subscribe(Jedis.java:2680)
at redis.clients.jedis.JedisSentinelPool$MasterListener.run(JedisSentinelPool.java:291)
End of exception ]
We have three server nodes one is master, slave, and another one is sentinel server node.
@bean
public JedisConnectionFactory jedisConnectionFactory() {
JedisConnectionFactory jedisConnectionFactory = new JedisConnectionFactory(this.redisSentinelConfiguration(),
this.jedisPoolConfig());
jedisConnectionFactory.setPassword(password);
return jedisConnectionFactory;
}
@bean
public RedisSentinelConfiguration redisSentinelConfiguration() {
Set hostAndPorts = new HashSet();
hostAndPorts.add(host + ":" + port);
RedisSentinelConfiguration redisSentinelConfiguration = new RedisSentinelConfiguration(master, hostAndPorts);
return redisSentinelConfiguration;
}
@bean
public JedisPoolConfig jedisPoolConfig() {
JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
jedisPoolConfig.setMaxTotal(Integer.parseInt(poolSize));
jedisPoolConfig.setMaxIdle(15);
jedisPoolConfig.setMinIdle(1);
jedisPoolConfig.setMaxWaitMillis(10000);
jedisPoolConfig.setTestOnBorrow(true);
return jedisPoolConfig;
}`
here is my redis server version and maven dependencies
Redis server v=3.0.3 sha=00000000:0 malloc=jemalloc-3.6.0 bits=64 build=dd7754250dca4ea7
and
org.springframework.data spring-data-redis 1.5.0.RELEASE redis.clients jedis 2.9.0 org.springframework.session spring-session-data-redis 1.3.1.RELEASE
It seems there is no problem with the timeouts and if you want the configuration files for the master, slave and sentinel nodes. I will update here.
Thanks.
The text was updated successfully, but these errors were encountered:
Hi i am also facing the same issue.
here is the exception.
[Start of Exception
SEVERE: Lost connection to Sentinel at sentinal server node: portno. Sleeping 5000ms and retrying.
redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:199)
at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40)
at redis.clients.jedis.Protocol.process(Protocol.java:151)
at redis.clients.jedis.Protocol.read(Protocol.java:215)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)
at redis.clients.jedis.Connection.getRawObjectMultiBulkReply(Connection.java:285)
at redis.clients.jedis.JedisPubSub.process(JedisPubSub.java:121)
at redis.clients.jedis.JedisPubSub.proceed(JedisPubSub.java:115)
at redis.clients.jedis.Jedis.subscribe(Jedis.java:2680)
at redis.clients.jedis.JedisSentinelPool$MasterListener.run(JedisSentinelPool.java:291)
End of exception ]
We have three server nodes one is master, slave, and another one is sentinel server node.
i am trying with following code
`@Value("${redis.sentinel.master}")
private String master;
@value("${redis.sentinel.host}")
private String host;
@value("${redis.sentinel.port}")
private String port;
@value("${redis.sentinel.password}")
private String password;
@value("${redis.sentinel.poolSize}")
private String poolSize;
@bean
public JedisConnectionFactory jedisConnectionFactory() {
JedisConnectionFactory jedisConnectionFactory = new JedisConnectionFactory(this.redisSentinelConfiguration(),
this.jedisPoolConfig());
jedisConnectionFactory.setPassword(password);
return jedisConnectionFactory;
}
@bean
public RedisSentinelConfiguration redisSentinelConfiguration() {
Set hostAndPorts = new HashSet();
hostAndPorts.add(host + ":" + port);
RedisSentinelConfiguration redisSentinelConfiguration = new RedisSentinelConfiguration(master, hostAndPorts);
return redisSentinelConfiguration;
}
@bean
public JedisPoolConfig jedisPoolConfig() {
JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
jedisPoolConfig.setMaxTotal(Integer.parseInt(poolSize));
jedisPoolConfig.setMaxIdle(15);
jedisPoolConfig.setMinIdle(1);
jedisPoolConfig.setMaxWaitMillis(10000);
jedisPoolConfig.setTestOnBorrow(true);
return jedisPoolConfig;
}`
here is my redis server version and maven dependencies
Redis server v=3.0.3 sha=00000000:0 malloc=jemalloc-3.6.0 bits=64 build=dd7754250dca4ea7
and
org.springframework.data spring-data-redis 1.5.0.RELEASE redis.clients jedis 2.9.0 org.springframework.session spring-session-data-redis 1.3.1.RELEASE
It seems there is no problem with the timeouts and if you want the configuration files for the master, slave and sentinel nodes. I will update here.
Thanks.
The text was updated successfully, but these errors were encountered: