alibaba / spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
https://sca.aliyun.com
Apache License 2.0
27.94k stars 8.33k forks source link

com.netflix.client.ClientException: Load balancer does not have available server for client: xxx #2798

Closed yujunchengg closed 2 years ago

yujunchengg commented 2 years ago

springcloud: Hoxton.SR12 alibabacloud: 2.2.7.RELEASE springboot: 2.3.12 上述整合后使用openfeign一直报错,我快找了一天了,一直说服务找不到,关键是服务都是注册到了nacos的,错误信息如下 2022-09-24 09:16:25.500 [XNIO-1 task-1] INFO com.netflix.loadbalancer.DynamicServerListLoadBalancer - DynamicServerListLoadBalancer for client goods initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=goods,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:com.alibaba.cloud.nacos.ribbon.NacosServerList@180a3d45 2022-09-24 09:16:25.548 [XNIO-1 task-1] ERROR c.bdwk.fastcloud.server.order.rpc.client.fallback.GoodsRpcClientFallbackFactory - com.netflix.client.ClientException: Load balancer does not have available server for client: goods java.lang.RuntimeException: com.netflix.client.ClientException: Load balancer does not have available server for client: goods at org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient.execute(LoadBalancerFeignClient.java:91) at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:119) at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89) at feign.hystrix.HystrixInvocationHandler$1.run(HystrixInvocationHandler.java:109) at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:302) at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:298) at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:46) at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35) at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)

steverao commented 2 years ago

Is the service name called goods in Nacos?

yujunchengg commented 2 years ago

我已经解决了,原来是nacos的注册中心去拉feign生产者端地址的时候,不能垮group,太坑了

steverao commented 2 years ago

我已经解决了,原来是nacos的注册中心去拉feign生产者端地址的时候,不能垮group,太坑了

好吧,从来都不支持跨命名空间进行服务发现。