-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
RedisHealthIndicator unable to recover from authentication failures #19436
Comments
Thanks for the report. What version of Spring Boot are you using? |
Hi @snicoll -
Also, if it helps for wider context; this is against the AWS ElastiCache Redis implementation. We noticed this problem after scheduling Redis maintenance/service updates in non-prod environments. |
@chadlwilson unfortunately I can't reproduce the problem. To help us identify where the problem might come from, can you please share a small sample (zip or github repo) with instructions on how the problem can be reproduced? |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
I've been struggling to reproduce this on a small sample with a local Redis. There are a lot of variables to eliminate which is a bit difficult without knowing all the underlying Spring Boot Actuator/Spring Data Redis/Lettuce magic. I'm thinking it's also possible that the issue lies with the way AWS ElasticCache behaves; and/or a particular state of pooled connections. :-/ |
Thanks for trying Chad. Perhaps @mp911de has an idea? |
I might raise an issue on the Lettuce GitHub; since after looking through a lot of the code through Spring Boot and Spring Data Redis, it seems this behaviour is intended to be fully managed by the Lettuce It seems after reconnect it has left the |
That’s my feeling as well. Please hold on creating a duplicate to avoid efforts being spent in two places. I’ve pinged the lead of the lettuce driver so we should get additional feedback soon. |
I tried to reproduce the issue without luck so far. Lettuce attempts to reconnect using the initially provided password and the reconnect process does not report failures when the password changed during reconnects. If you can reproduce that issue in any environment, please raise the log level of That issue isn't Spring Boot related, more likely it is Lettuce-related. |
Thanks for the feedback. I am closing this issue now. Please create an issue in the lettuce issue tracker if you manage to reproduce with the request logging information. |
When a Redis (non-cluster mode) server requiring authentication is restarted the Spring Boot Actuator
RedisHealthIndicator
seems unable to recover. It repeatedly logs:After initially losing the connection and having it restored:
Configuration is standard
Environment
Spring Boot 2.2.2.RELEASE
Spring Data Redis 2.2.3.RELEASE
Spring Framework 5.2.2.RELEASE
Lettuce 5.2.1.RELEASE
AWS ElastiCache for Redis (underlying Redis is 5.0.3) with authentication enabled
Possibly this is an issue with the underlying Spring Data Redis or Lettuce configuration, but we were a bit surprised that this wasn't working/auto-recovering and re-authenticating out of the box.
Since we use the Actuator endpoint as a Kubernetes
readinessProbe
this meant traffic was not sent to the application and it was not able to self-heal.The text was updated successfully, but these errors were encountered: