Jedis Exceptions from Scala code

Getting below redis errors from Scala code, need help on the below and also i have kept code snippet.

1]redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream
2]redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Connection closed by remote host
3]redis.clients.jedis.exceptions.JedisConnectionException: Attempting to read from a broken connection

//Code
val sslSocketFactory: SSLSocketFactory =
SSLSocketFactory.getDefault.asInstanceOf[SSLSocketFactory]

val sslParameters: SSLParameters = new SSLParameters()
val jedisPoolConfig = new JedisPoolConfig()
jedisPoolConfig.setMaxTotal(1000)
jedisPoolConfig.setMaxIdle(1);
jedisPoolConfig.setMinIdle(1);
jedisPoolConfig.setTestOnBorrow(true);
jedisPoolConfig.setTestOnReturn(true);
jedisPoolConfig.setTestWhileIdle(true);
jedisPoolConfig.setMinEvictableIdleTimeMillis(Duration.ofSeconds(60).toMillis());
jedisPoolConfig.setTimeBetweenEvictionRunsMillis(Duration.ofSeconds(30).toMillis());
jedisPoolConfig.setNumTestsPerEvictionRun(3);
jedisPoolConfig.setBlockWhenExhausted(true);

val shardInfo: JedisShardInfo =
new JedisShardInfo(uriString, port, sslFlag, sslSocketFactory, sslParameters, null)
shardInfo.setPassword(password)
shardInfo.setSoTimeout(3000)
val jedisPool = new JedisPool(jedisPoolConfig, shardInfo.getHost(), shardInfo.getPort(), shardInfo.getSoTimeout, shardInfo.getPassword(), sslFlag, sslSocketFactory, sslParameters, null);
clients = jedisPool.getResource()
clients.auth(password)
//End

Can you provide more info on your configuration/setup? On the meantime look at:

@bsbodden , above links was not helpful,

we need definite solution for this.

Hi Koushik,

Are you certain you’ve configured Redis correctly for SSL? What’s your Redis configuration?

Kyle