question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JedisCluster didn't reconnect with new IP when domain changes

See original GitHub issue

Expected behavior

I use the domain not the IP of Redis Server as parameter of JedisCluster

Set<HostAndPort> testjedisClusterNode = new HashSet<HostAndPort>();
testjedisClusterNode.add(new HostAndPort("mydomain.com", 6379));
new JedisCluster(testjedisClusterNode,...)

But when the Redis is rebuilt and it’s ip changes, It seems that the JedisCluster isn’t reconfigured by the new ip.

Actual behavior

User must restart the client manually even the server has recovered.
Typically, more and more Servers run on Kubernetes as POD and POD’s IP can be changed easily

Steps to reproduce:

Redis / Jedis Configuration

Jedis version:

Latest

Redis version:

6.0

Java version:

8

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:24 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
yangbodong22011commented, Feb 17, 2022

@yangbodong22011 Would you like to work on this?

Of course, I will continue to modify https://github.com/redis/jedis/pull/2643 .

1reaction
sazzad16commented, Feb 17, 2022

Resolved by #2643

Read more comments on GitHub >

github_iconTop Results From Across the Web

JedisCluster works in 2.7.x but doesn't work in Jedis 2.9.x with ...
I feel firewall may not be the problem because my system can connect to JedisCluster in Jedis 2.7.x and can use Jedis by...
Read more >
Read/Connect timeouts to Jedis Cluster - Google Groups
Just trying to understand timeouts with regards to Jedis Cluster. ... Extremely minor, change the related eviction settings to prime numbers.
Read more >
IP address changed and unable to connect to the java services?
The server has been assigned a new IP address. All instances (ABAP+JAVA) have come up and i was able to login the ABAP...
Read more >
Alibaba Cloud
Use a private endpoint to connect to an ApsaraDB for Redis insta ... In the Retained Classic Network IP Address section, click Change...
Read more >
Lettuce Reference Guide
redis-socket Redis Standalone Unix Domain Socket ... allowing to listen for cluster reconfiguration and reconnect if the topology changes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found