-
Notifications
You must be signed in to change notification settings - Fork 986
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
Attach topology retrieval exceptions when Lettuce cannot retrieve a topology update #1024
Comments
Redis Cluster partition retrieval is attempted from multiple hosts and hence multiple errors can happen. Lettuce does not fail on the first error but attempts to retrieve the topology from other nodes. Since each Redis node can be configured individually, one node can be configured with a wrong password while other nodes might succeed. We attach the underlying cause as suppressed exceptions to Just reporting |
if the cluster has no password, but I configure it for lettuce, the exception message that lettuce reports contains error message "no password is set", I can check the exception and try to create a connection without password. if the cluster has password, but I don't configure it, the initial exception is just "Cannot retrieve initial cluster partitions", it is confused because I only know that Iettuce can't initialize partitions without any reason. So there is nothing I can do in my code to handle this situation like reloading password |
You can traverse exception hierarchy and inspect suppressed exceptions ( |
yes, I do. the doLoadPartitions() method in RedisClusterClient throws a new RedisException if the partition is empty, but this exception has no other info. |
…opology update #1024 We now fail earlier with an exception when topology retrieval has failed. We also attach individual failures as cause/suppressed exceptions to add context for error tracing.
…opology update #1024 We now fail earlier with an exception when topology retrieval has failed. We also attach individual failures as cause/suppressed exceptions to add context for error tracing.
That's in place now and backported to 5.1.7. |
Hi @mp911de |
@roottraveller please file a new ticket containing debug information such as a stack trace, a thread dump and describing your case. We cannot derive any specific information from a generic "It does not work". |
Thanks a lot! |
Feature Request
throw the "NOAUTH" exception instead of “Cannot retrieve initial cluster partitions”, in other words, clarify why lettuce can't initialize the partitions.
Is your feature request related to a problem? Please describe
if a cluster has password, but we don's configure it for lettuce RedisClusterClient.
when the RedisClusterClient would initialize the cluster partitions, lettuce would create a new connection. and then report the exception "Cannot retrieve initial cluster partitions", just some WARN logs that report "NOAUTH".
here is the error:
Describe the solution you'd like
add the info why lettuce cannot retrieve initial cluster partitions in the exception, connection refuse or "NOAUTH" or others.
The text was updated successfully, but these errors were encountered: