Skip to content
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

The SpringCloud gateway is failing to call a Kubernetes service: "No servers available for service". #1726

Open
oasis-zhou opened this issue Sep 19, 2024 · 3 comments

Comments

@oasis-zhou
Copy link

SpringBoot version: 3.3.3
SpringCloud version: 2023.0.3
SpringCloud Kubernetes version: 3.1.3

When calling other services within the same namespace from the gateway, either through OpenFeign or RestTemplate, the first call is successful, but subsequent calls fail with the following error: o.s.cloud.loadbalancer.core.RoundRobinLoadBalancer [USER:] [TRACEID:] - No servers available for service

When the configuration is changed to: spring.cloud.kubernetes.loadbalancer.mode = service, all the calls are successful.

@oasis-zhou
Copy link
Author

The cache configuration when the above error occurred was: spring.cloud.kubernetes.loadbalancer.enabled = false. When set to True, the same error occurs after the cache expires in 35 seconds.

@wind57
Copy link
Contributor

wind57 commented Sep 19, 2024

If you want us to diagnose the issue we are going to need a minimal reproducible example, like a github repo, with clear instructions how to see the issue. Thank you

@wind57
Copy link
Contributor

wind57 commented Sep 19, 2024

@ryanjbaxter can you add the feedback label please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants