com.netflix.client.ClientException: Load balancer does not have available server for client xxxx

版本
spring boot: 2.0.1.RELEASEspring

spring cloud: Finchley.M9app

錯誤
經過zuul調用eureka註冊的服務,錯誤內容以下spa

Caused by: com.netflix.client.ClientException: Load balancer does not have available server for client xxxxx.net

方案
通過查詢排查,兩種解決方案code

方案一(親測有效)server

在application.properties中添加blog

ribbon.eureka.enable: true

方案二io

  添加依賴(已經親測有效)class

<dependency>  
    <groupId>org.springframework.cloud</groupId>  
    <artifactId>spring-cloud-starter-eureka</artifactId>  
</dependency> 

 

原文連接:https://blog.csdn.net/jiadajing267/article/details/81047335cli

相關文章
相關標籤/搜索