-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jedis connect failed when using dns resolver in jedis 5.1.2 #3871
Comments
Same for jedis 5.1.2, Redis 7.4.2, openjdk version "18.0.2.1" 2022-08-18 |
@ellabider @katsanva Was it fine with an earlier (but somewhat recent) version of Jedis? |
@sazzad16 I've tried to upgrade from 3.10.0 |
Same issue on our side. I tried with 5.1.3, then with 5.0.0 and still have it. Upgrade was from 4.3.2. |
It occurred in 4.2.3 for sure. 3.8.0 - was OK, I think |
Expected behavior
connect success
Actual behavior
Write here what happens instead ...
redis.clients.jedis.exceptions.JedisConnectionException: Failed to connect to any host resolved for DNS name.
at redis.clients.jedis.DefaultJedisSocketFactory.connectToFirstSuccessfulHost(DefaultJedisSocketFactory.java:63) ~[jedis-5.1.2.jar:?]
at redis.clients.jedis.DefaultJedisSocketFactory.createSocket(DefaultJedisSocketFactory.java:89) ~[jedis-5.1.2.jar:?]
at redis.clients.jedis.Connection.connect(Connection.java:194) ~[jedis-5.1.2.jar:?]
at redis.clients.jedis.Connection.initializeFromClientConfig(Connection.java:392) ~[jedis-5.1.2.jar:?]
at redis.clients.jedis.Connection.(Connection.java:67) ~[jedis-5.1.2.jar:?]
at redis.clients.jedis.Jedis.(Jedis.java:220) ~[jedis-5.1.2.jar:?]
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:170) ~[jedis-5.1.2.jar:?]
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:566) ~[commons-pool2-2.12.0.jar:2.12.0]
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:306) ~[commons-pool2-2.12.0.jar:2.12.0]
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:233) ~[commons-pool2-2.12.0.jar:2.12.0]
at redis.clients.jedis.util.Pool.getResource(Pool.java:38) ~[jedis-5.1.2.jar:?]
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:378) ~[jedis-5.1.2.jar:?]
Steps to reproduce:
try(Jedis jedis = new Jedis("redis-host.mv.com", 6379)) {
System.out.println(jedis.ping()); // failed
}
most of time works as expected, but sometime randomly fails with a set of above failure with different redis endpoints
Redis / Jedis Configuration
using AWS EC2 resolver
Jedis version: 5.1.2
Redis version:7.2.4
Java version: openjdk version "21.0.2"
The text was updated successfully, but these errors were encountered: