2021年10月18日 | Leave a comment 问题: com.netflix.client.ClientException: Load balancer does not have available server for client: user at com.netflix.loadbalancer.LoadBalancerContext.getServerFromLoadBalancer(LoadBalancerContext.java:483) ~[ribbon-loadbalancer-2.3.0.jar:2.3.0] at com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:184) ~[ribbon-loadbalancer-2.3.0.jar:2.3.0] at com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:180) ~[ribbon-loadbalancer-2.3.0.jar:2.3.0] at rx.Observable.unsafeSubscribe(Observable.java:10327) ~[rxjava-1.3.8.jar:1.3.8] 12345 com.netflix.client.ClientException: Load balancer does not have available server for client: user at com.netflix.loadbalancer.LoadBalancerContext.getServerFromLoadBalancer(LoadBalancerContext.java:483) ~[ribbon-loadbalancer-2.3.0.jar:2.3.0] at com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:184) ~[ribbon-loadbalancer-2.3.0.jar:2.3.0] at com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:180) ~[ribbon-loadbalancer-2.3.0.jar:2.3.0] at rx.Observable.unsafeSubscribe(Observable.java:10327) ~[rxjava-1.3.8.jar:1.3.8] @FeignClient("user") @RibbonClient("e1") public interface UserClient { @GetMapping("/user/{id}/name") String getName(@PathVariable("id") Integer userId); } 12345678 @FeignClient("user")@RibbonClient("e1")public interface UserClient { @GetMapping("/user/{id}/name") String getName(@PathVariable("id") Integer userId); } 解决: @FeignClient(“E1”) E1 对于 提供服务的 application.name @FeignClient("user") public interface UserClient { @GetMapping("/user/{id}/name") String getName(@PathVariable("id") Integer userId); } 1234567 @FeignClient("user")public interface UserClient { @GetMapping("/user/{id}/name")String getName(@PathVariable("id") Integer userId); } 参考: