访问接口错误,com.netflix.client.ClientException: Load balancer does not have available server for client: ...


com.netflix.client.ClientException: Load balancer does not have available server for client: panfeng-item-service
...
...
...

 

接口访问返回 POST 500

访问接口错误,com.netflix.client.ClientException: Load balancer does not have available server for client: ..._第1张图片

 

因为com.netflix.client.ClientException: Load balancer does not have available server for client: panfeng-item-service

翻译过来就是负载均衡的问题

解决办法,就是在 panfeng-item-service的application.properties加上以下内容

#解决错误 com.netflix.client.ClientException: Load balancer does not have available server for client:panfeng-item-service
#开启eureka负载均衡策略
ribbon.eureka.enabled=true

 

 

加上之后服务重启之后就可以正常访问了~!!!!

 

 

服务的调用情况

访问接口错误,com.netflix.client.ClientException: Load balancer does not have available server for client: ..._第2张图片

访问接口错误,com.netflix.client.ClientException: Load balancer does not have available server for client: ..._第3张图片

 

转载于:https://www.cnblogs.com/taopanfeng/p/11237784.html

你可能感兴趣的:(访问接口错误,com.netflix.client.ClientException: Load balancer does not have available server for client: ...)