Load balancer does not have available server for client
Posted 沧海一滴
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Load balancer does not have available server for client相关的知识,希望对你有一定的参考价值。
最近在研究spring-cloud,研究zuul组件时发生下列错误:
Caused by: com.netflix.client.ClientException: Load balancer does not have available server for client: zuul-server
解决办法就是在pom文件里添加
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka</artifactId> </dependency>
我测试的是通过zuul调用eureka注册的服务,网上文章写的不全,补上缺失的部分。可以参考网上的文章然后加上这部分就可以通过zuul调用eureka服务了。
我的示例代码在git上,不多说一切尽在代码中。
地址:https://github.com/leozhang123/springcloud-example.git
http://l7980.iteye.com/blog/2348574
以上是关于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
FeignLoad balancer does not contain an instance for the service xxx-service
FeignLoad balancer does not contain an instance for the service xxx-service
Go: invalid operation - type *map[key]value does not support indexing