-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Description
Is your feature request related to a problem? Please describe.
While establishing a connection through ClusterConnectionManager (redisson/src/main/java/org/redisson/connection/ClusterConnectionManager.java), a null message is being logged at the warn level.
After investigation, I found that this happens when a connection attempt fails inside the doConnect method. It uses connectionFuture, but the configured timeout was too short, causing an exception to be logged as log.warn(e.getMessage()), which results in a null message.
Describe the solution you'd like
Although increasing the timeout value mitigates the issue, I believe the logging could be improved to be more helpful and informative.
Since connection timeouts can frequently occur, especially during connection initialization, I suggest adding a more descriptive log message when e.getCause() is an instance of ConnectTimeoutException. This would make the log clearer and help users understand the actual cause of the issue.
Describe alternatives you've considered
The problem was resolved by increasing the timeout value, but that doesn’t improve the developer experience when diagnosing such issues. Clearer logging in timeout scenarios would provide immediate insight and improve usability without requiring deep investigation into the source code.