I'm using same code on 4.x and 3.x, while on 3.x it's working without any issue then on 4.x it's throwing exceptions
Just create pool:
final JedisPoolConfig poolConfig = new JedisPoolConfig();
poolConfig.setMaxTotal(16);
poolConfig.setMaxIdle(4);
poolConfig.setTestWhileIdle(true);
if (poolConfig.getMinIdle() < 1)
{
poolConfig.setMinIdle(2);
}
JedisPool pool = new JedisPool(poolConfig, AppConfig.redisHost, AppConfig.redisPort, AppConfig.redisTimeout, AppConfig.redisPass);
Then, after some time, while using my app i got those errors:
redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required.
11:24:06 [WARN]: at redis.clients.jedis.Protocol.processError(Protocol.java:96)
11:24:06 [WARN]: at redis.clients.jedis.Protocol.process(Protocol.java:137)
11:24:06 [WARN]: at redis.clients.jedis.Protocol.read(Protocol.java:192)
11:24:06 [WARN]: at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:316)
11:24:06 [WARN]: at redis.clients.jedis.Connection.getOne(Connection.java:298)
11:24:06 [WARN]: at redis.clients.jedis.Connection.executeCommand(Connection.java:123)
11:24:06 [WARN]: at redis.clients.jedis.Jedis.zrevrange(Jedis.java:6522)
11:24:06 [WARN]: at (***).LocalRanking$1.run(LocalRanking.java:68)
(..)
11:24:26 [ERROR]: [redis.clients.jedis.JedisFactory] Error while validating pooled Jedis object.
redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required.
at redis.clients.jedis.Protocol.processError(Protocol.java:96) ~[?:?]
at redis.clients.jedis.Protocol.process(Protocol.java:137) ~[?:?]
at redis.clients.jedis.Protocol.read(Protocol.java:192) ~[?:?]
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:316) ~[?:?]
at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:243) ~[?:?]
at redis.clients.jedis.Jedis.ping(Jedis.java:356) ~[?:?]
at redis.clients.jedis.JedisFactory.validateObject(JedisFactory.java:211) ~[?:?]
at org.apache.commons.pool2.impl.GenericObjectPool.evict(GenericObjectPool.java:745) ~[?:?]
at org.apache.commons.pool2.impl.BaseGenericObjectPool$Evictor.run(BaseGenericObjectPool.java:160) ~[?:?]
at org.apache.commons.pool2.impl.EvictionTimer$WeakRunner.run(EvictionTimer.java:113) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Expected behavior
No exception thrown
Actual behavior
NOAUTH Authentication required DataException is thrown after some time
Steps to reproduce:
Please create a reproducible case of your problem. Make sure
that case repeats consistently and it's not random
- Create pool
- Use it, wait some time
- Exception thrown
Redis / Jedis Configuration
(see code example)
Jedis version:
4.2.3
Redis version:
6.0.3 / 7.0.3 (tested both)
Java version:
JAVA 17 (17.0.3.1+2-LTS-6)
I'm using same code on 4.x and 3.x, while on 3.x it's working without any issue then on 4.x it's throwing exceptions
Just create pool:
Then, after some time, while using my app i got those errors:
Expected behavior
No exception thrown
Actual behavior
NOAUTH Authentication required DataException is thrown after some time
Steps to reproduce:
Please create a reproducible case of your problem. Make sure
that case repeats consistently and it's not random
Redis / Jedis Configuration
(see code example)
Jedis version:
4.2.3
Redis version:
6.0.3 / 7.0.3 (tested both)
Java version:
JAVA 17 (17.0.3.1+2-LTS-6)