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


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: 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

 

 

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

 

 

服务的调用情况

 

posted on 2019-07-24 14:27  陶攀峰  阅读(51129)  评论(1编辑  收藏  举报

顶部 底部