FeignLoad balancer does not contain an instance for the service xxx-service

Posted 幽灵雾

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了FeignLoad balancer does not contain an instance for the service xxx-service相关的知识,希望对你有一定的参考价值。

【问题现象】

在使用Feign进行服务见API调用时,出现如下问题:


[503] during [GET] to [http://xxx-service/test/get?name=xxx] 
[TestServicesApi#get(String)]: [Load balancer does not contain an instance for the service server-service]

【原因】

请求被拒绝,服务端没有找到对应API服务,可能的原因是请求的“xxx-service”域名(即服务名称)和服务的application.name不一致导致

【解决】

将服务端API接口注解@FeignClient中name改为application.name


以上是关于FeignLoad balancer does not contain an instance for the service xxx-service的主要内容,如果未能解决你的问题,请参考以下文章

load balancer does not have available server for client: provider

Load balancer does not have available server for client

feign Load balancer does not have available server for client

getway API网关报错:Load balancer does not have available server for client: vat-core

Go: invalid operation - type *map[key]value does not support indexing

LeetCode 110. Balanced Binary Tree