alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.28k stars 12.84k forks source link

控制台一直打印 Failed one update cycle Can not get service instances from nacos, serviceId=null #9204

Closed Layfolk-zcy closed 2 years ago

Layfolk-zcy commented 2 years ago
2.3.12.RELEASE Hoxton.SR12 2.2.9.RELEASE ![image](https://user-images.githubusercontent.com/59356890/191939490-10ee454b-5af8-46f1-96dc-abd9f09d56d4.png) ` org.springframework.cloud spring-cloud-starter-openfeign com.alibaba.cloud spring-cloud-starter-alibaba-nacos-discovery org.springframework.boot spring-boot-starter-web org.springframework spring-context-support com.github.ben-manes.caffeine caffeine com.netflix.ribbon ribbon-core ` ` java.lang.IllegalStateException: Can not get service instances from nacos, serviceId=null at com.alibaba.cloud.nacos.ribbon.NacosServerList.getServers(NacosServerList.java:60) ~[spring-cloud-starter-alibaba-nacos-discovery-2.2.9.RELEASE.jar:2.2.9.RELEASE] at com.alibaba.cloud.nacos.ribbon.NacosServerList.getUpdatedListOfServers(NacosServerList.java:49) ~[spring-cloud-starter-alibaba-nacos-discovery-2.2.9.RELEASE.jar:2.2.9.RELEASE] at com.netflix.loadbalancer.DynamicServerListLoadBalancer.updateListOfServers(DynamicServerListLoadBalancer.java:240) ~[ribbon-loadbalancer-2.3.0.jar:2.3.0] at com.netflix.loadbalancer.DynamicServerListLoadBalancer$1.doUpdate(DynamicServerListLoadBalancer.java:62) ~[ribbon-loadbalancer-2.3.0.jar:2.3.0] at com.netflix.loadbalancer.PollingServerListUpdater$1.run(PollingServerListUpdater.java:116) ~[ribbon-loadbalancer-2.3.0.jar:2.3.0] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_201] at java.util.concurrent.FutureTask.runAndReset$$$capture(FutureTask.java:308) [na:1.8.0_201] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java) [na:1.8.0_201] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_201] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_201] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_201] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_201] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_201] Caused by: java.lang.IllegalArgumentException: Param 'serviceName' is illegal, serviceName is blank at com.alibaba.nacos.api.naming.utils.NamingUtils.getGroupedName(NamingUtils.java:47) ~[nacos-client-2.1.0.jar:na] at com.alibaba.nacos.client.naming.cache.ServiceInfoHolder.getServiceInfo(ServiceInfoHolder.java:123) ~[nacos-client-2.1.0.jar:na] at com.alibaba.nacos.client.naming.NacosNamingService.selectInstances(NacosNamingService.java:288) ~[nacos-client-2.1.0.jar:na] at com.alibaba.nacos.client.naming.NacosNamingService.selectInstances(NacosNamingService.java:260) ~[nacos-client-2.1.0.jar:na] at com.alibaba.nacos.client.naming.NacosNamingService.selectInstances(NacosNamingService.java:248) ~[nacos-client-2.1.0.jar:na] at com.alibaba.cloud.nacos.ribbon.NacosServerList.getServers(NacosServerList.java:56) ~[spring-cloud-starter-alibaba-nacos-discovery-2.2.9.RELEASE.jar:2.2.9.RELEASE] ... 12 common frames omitted `
KomachiSion commented 2 years ago

Caused by: java.lang.IllegalArgumentException: Param 'serviceName' is illegal, serviceName is blank

这个是ribbon的错误, 应该是传入的服务名是空, 所以找不到对应实例,和nacos无关。可以自行排查一下, 或者提issue到SCA社区找一下答案。

x86isnice commented 1 year ago

同样的版本,同样的问题,问下后来怎么解决了来着?