Hi
I have successfully used local (docker) redis with Java 21 and jedis 5.0.3.
Now for production we are going for AWS Memory DB for redis. After verifying credentials and --tls with redis-cli on Amazon Linux EC2 i tried with code using DefaultJedisClientConfig, hostAndPortSet and
jedisCluster = new JedisCluster(hostAndPortSet, jedisClientConfig, maxAttempts); which goes through without exception.
However, when i try the first jedisCluster.get("an existing key") it crashes with
Caused by: java.lang.NullPointerException: Cannot suppress a null exception.
at java.base/java.util.Objects.requireNonNull(Objects.java:259) ~[na:na]
at java.base/java.lang.Throwable.addSuppressed(Throwable.java:1098) ~[na:na]
at redis.clients.jedis.executors.ClusterCommandExecutor.executeCommand(ClusterCommandExecutor.java:130) ~[jedis-5.0.2.jar!/:na]
at redis.clients.jedis.UnifiedJedis.executeCommand(UnifiedJedis.java:244) ~[jedis-5.0.2.jar!/:na]
at redis.clients.jedis.UnifiedJedis.get(UnifiedJedis.java:722) ~[jedis-5.0.2.jar!/:na]
at tech.kallio.configsvc.CfgStoreAWSMemDB4redis.get...
Is this a known bug inside jedis? Could the .build not detect a null for a required field? I find the documentation lacking as it seems to assume we know if for instance clientName has some special meaning.
The builder is as follows... with null/0 for most values.
Builder cfgBuilder = DefaultJedisClientConfig.builder().clientName(clientName)
.timeoutMillis(clientTimeoutInSecs * 1000) .connectionTimeoutMillis(connectionTimeoutInSecs * 1000)
.blockingSocketTimeoutMillis(blockingSocketTimeoutInSecs * 1000)
.socketTimeoutMillis(socketTimeoutInSecs * 1000) .ssl(useSSL);
if (userName != null)
cfgBuilder = cfgBuilder.user(userName).password(password);
Would be great if someone has a solution for us.
Guess i'll try with some timeout values if timeout is reported with null exceptions.