-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
"ClusterClient.Ping().Result() error: got 4 elements in cluster info address, expected 2 or 3" when used for accessing redis cluster #2085
Comments
Did you solve it, I have this problem too |
I guess you are using the latest redis version(7.x), I downgrade back to 6.x version solved the problem. |
Hi what is the solution to this issue? What specific version tag works? |
|
|
Yes, you are right. Thank you. |
I replaced redis 7.x with redis 6.x ,and it worked well. |
我也遇到了,降回6.2.5就OK了 |
Following the codelab https://cloud.google.com/kubernetes-engine/docs/tutorials/upgrading-stateful-workload today yields an error: ``` 500 - Error due to redis cluster broken! got 4 elements in cluster info address, expected 2 or 3 ``` This seems to be because redis version 7 was released April of this year and is currently incompatible with go-redis. See redis/go-redis#2085 . For now, we should fix redis in the codelab at 6.2 for it to continue working. Once a stable go-redis is released (v9 currently in beta -- https://github.com/go-redis/redis/tree/v9.0.0-beta.1), we can fix this to v7 instead, rebuild the image used in the app-deployment to the latest go-redis version as an alternative fix.
Following the codelab https://cloud.google.com/kubernetes-engine/docs/tutorials/upgrading-stateful-workload today yields an error: ``` 500 - Error due to redis cluster broken! got 4 elements in cluster info address, expected 2 or 3 ``` This seems to be because redis version 7 was released April of this year and is currently incompatible with go-redis. See redis/go-redis#2085 . For now, we should fix redis in the codelab at 6.2 for it to continue working. Once a stable go-redis is released (v9 currently in beta -- https://github.com/go-redis/redis/tree/v9.0.0-beta.1), we can fix this to v7 instead, rebuild the image used in the app-deployment to the latest go-redis version as an alternative fix.
我从 redis:7.0.2-alpine 回退到 6.2 ,确实不报错了,谢谢
|
Please use github.com/go-redis/redis/v9 with Redis 7 |
|
hello parse.go info := ClusterSlotInfo{
reloadSlots begin |
info := ClusterSlotInfo{
|
I also got |
The real fix PR for this issue is: #2108 |
Issue tracker is used for reporting bugs and discussing new features. Please use
stackoverflow for supporting issues.
go-redis reports error when it is used to access redis-cluster
Expected Behavior
go-redis/redis should works well with redis cluster
Current Behavior
go-redis/redis ClusterClient.Ping().Result() reports error "got 4 elements in cluster info address, expected 2 or 3" (my redis cluster has six nodes)
Possible Solution
Steps to Reproduce
and my go version is
When I set or get key with redis-cli, it works well.
3. Then I test with a simple go program, as follows
build and run this program, it report error, as follows
I think this is a bug, please check and fix it. Thank you very much!
Context (Environment)
Detailed Description
Possible Implementation
The text was updated successfully, but these errors were encountered: