Load balancer does not have available server for client: 192.168.1.245
Type: bug report
what happened
The project has three modules: gateway, order and prodcut.
Every modules has started and registried in nacos, one request to order is forwarded by gateway, the order module has exception that does not have available server for client: 192.168.1.245.
The starting log shows that the order module update server list twice: one by application name, the other one by ip what cause the excption.
The order‘s starting log has these message:
2020-04-10 15:51:47.378 INFO [sc-unit-order-service,b81c3fff116c1a51,70851603a53071ad,false] 27315 --- [io-12014-exec-1] c.netflix.config.ChainedDynamicProperty : Flipping property: sc-unit-product-service.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2020-04-10 15:51:47.405 INFO [sc-unit-order-service,b81c3fff116c1a51,70851603a53071ad,false] 27315 --- [io-12014-exec-1] c.netflix.loadbalancer.BaseLoadBalancer : Client: sc-unit-product-service instantiated a LoadBalancer: DynamicServerListLoadBalancer:{NFLoadBalancer:name=sc-unit-product-service,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:null
2020-04-10 15:51:47.414 INFO [sc-unit-order-service,b81c3fff116c1a51,70851603a53071ad,false] 27315 --- [io-12014-exec-1] c.n.l.DynamicServerListLoadBalancer : Using serverListUpdater PollingServerListUpdater
2020-04-10 15:51:47.436 INFO [sc-unit-order-service,b81c3fff116c1a51,70851603a53071ad,false] 27315 --- [io-12014-exec-1] c.netflix.config.ChainedDynamicProperty : Flipping property: sc-unit-product-service.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2020-04-10 15:51:47.440 INFO [sc-unit-order-service,b81c3fff116c1a51,70851603a53071ad,false] 27315 --- [io-12014-exec-1] c.n.l.DynamicServerListLoadBalancer : DynamicServerListLoadBalancer for client sc-unit-product-service initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=sc-unit-product-service,current list of Servers=[192.168.1.245:12015],Load balancer stats=Zone stats: {unknown=[Zone:unknown; Instance count:1; Active connections count: 0; Circuit breaker tripped count: 0; Active connections per server: 0.0;]
},Server stats: [[Server:192.168.1.245:12015; Zone:UNKNOWN; Total Requests:0; Successive connection failure:0; Total blackout seconds:0; Last connection made:Thu Jan 01 08:00:00 CST 1970; First connection made: Thu Jan 01 08:00:00 CST 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:com.alibaba.cloud.nacos.ribbon.NacosServerList@11eb14d7
2020-04-10 15:51:47.598 INFO [sc-unit-order-service,b81c3fff116c1a51,70851603a53071ad,false] 27315 --- [io-12014-exec-1] c.netflix.config.ChainedDynamicProperty : Flipping property: 192.168.1.245.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2020-04-10 15:51:47.601 INFO [sc-unit-order-service,b81c3fff116c1a51,70851603a53071ad,false] 27315 --- [io-12014-exec-1] c.netflix.loadbalancer.BaseLoadBalancer : Client: 192.168.1.245 instantiated a LoadBalancer: DynamicServerListLoadBalancer:{NFLoadBalancer:name=192.168.1.245,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:null
2020-04-10 15:51:47.604 INFO [sc-unit-order-service,b81c3fff116c1a51,70851603a53071ad,false] 27315 --- [io-12014-exec-1] c.n.l.DynamicServerListLoadBalancer : Using serverListUpdater PollingServerListUpdater
2020-04-10 15:51:47.611 INFO [sc-unit-order-service,b81c3fff116c1a51,70851603a53071ad,false] 27315 --- [io-12014-exec-1] c.n.l.DynamicServerListLoadBalancer : DynamicServerListLoadBalancer for client 192.168.1.245 initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=192.168.1.245,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:com.alibaba.cloud.nacos.ribbon.NacosServerList@51512427
2020-04-10 15:51:47.719 ERROR [sc-unit-order-service,b81c3fff116c1a51,70851603a53071ad,false] 27315 --- [io-12014-exec-1] o.s.c.s.i.web.ExceptionLoggingFilter : Uncaught exception thrown
Caused by: java.lang.RuntimeException: com.netflix.client.ClientException: Load balancer does not have available server for client: 192.168.1.245
development environment
- nacos 1.1.4
- spring-cloud-alibaba 2.1.0.RELEASE
- spring-cloud-starter-alibaba-seata 2.1.0.RELEASE
- macOS 10.15.3
6条答案
按热度按时间unftdfkk1#
i have the same problem, and my solution like this:
https://blog.csdn.net/jiangxuexuanshuang/article/details/105815556
Hope to help you.
god bless me
3df52oht2#
@YLLQQ debug
SeataLoadBalancerFeignClient
hsgswve43#
我也遇到了 去掉seata的相关依赖就可以 加上就不行
j0pj023g4#
i have the same problem~
qcbq4gxm5#
为了使用seata,引入 这个依赖。发现服务启动时有提示找不到eureka-client属性.
然后feign调用服务的时候,如果指定url就报找不到服务了,不指定url可以调服务器上的服务
dauxcl2d6#
<spring.boot.version>2.3.12.RELEASE</spring.boot.version>
<spring.cloud.version>Hoxton.SR12</spring.cloud.version>
<spring.cloud.alibaba.version>2.2.7.RELEASE</spring.cloud.alibaba.version>
seata 版本1.3
seata 集成 openclient 异常: