Spring Boot Ribbon没有找到实例,但它有自己的地址

时间:2017-07-22 17:43:41

标签: java spring spring-boot netflix-eureka netflix-ribbon

我正在编写一个使用Ribbon的应用程序,我有如下错误:

2017-07-22 19:05:22.742  WARN 9907 --- [nio-8091-exec-8] com.netflix.loadbalancer.RoundRobinRule  : No up servers available from load balancer: DynamicServerListLoadBalancer:{NFLoadBalancer:name=reservationManagement,current list of Servers=[<MY_IP>:8090, <MY_IP>:8082],Load balancer stats=Zone stats: {defaultzone=[Zone:defaultzone;   Instance count:2;       Active connections count: 0; Circuit breaker tripped count: 0;        Active connections per server: 0.0;]
},Server stats: [[Server:<MY_IP>:8090;    Zone:defaultZone;       Total Requests:0;       Successive connection failure:0;     Total blackout seconds:0;        Last connection made:Thu Jan 01 01:00:00 CET 1970;      First connection made: Thu Jan 01 01:00:00 CET 1970;  Active Connections:0;   total failure count in last (1000) msecs:0;     average resp time:0.0;  90 percentile resp time:0.0; 95 percentile resp time:0.0;     min resp time:0.0;      max resp time:0.0;      stddev resp time:0.0]
, [Server:<MY_IP>:8082;   Zone:defaultZone;       Total Requests:0;       Successive connection failure:0;        Total blackout seconds:0;     Last connection made:Thu Jan 01 01:00:00 CET 1970;      First connection made: Thu Jan 01 01:00:00 CET 1970;    Active Connections:0; total failure count in last (1000) msecs:0;     average resp time:0.0;  90 percentile resp time:0.0;    95 percentile resp time:0.0;  min resp time:0.0;      max resp time:0.0;      stddev resp time:0.0]
]}ServerList:org.springframework.cloud.netflix.ribbon.eureka.DomainExtractingServerList@54b38e96
2017-07-22 19:05:22.744 ERROR 9907 --- [nio-8091-exec-8] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: No instances available for reservationManagement] with root cause

java.lang.IllegalStateException: No instances available for reservationManagement
        at org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.execut

为什么Ribbon表示在“当前服务器列表”中打印时没有reservationManagement实例,其中有两个(这是真的)?

我很感激你的答案!

PS。这些应用程序在Eureka中也可见,当我使用Zuul服务器时,它运行良好。

0 个答案:

没有答案