com.alibaba.nacos.api.exception.NacosException: Request nacos server failed:
at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.requestToServer(NamingGrpcClientProxy.java:227) ~[nacos-client-2.0.2.jar!/:na]
at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.subscribe(NamingGrpcClientProxy.java:186) ~[nacos-client-2.0.2.jar!/:na]
at com.alibaba.nacos.client.naming.remote.NamingClientProxyDelegate.subscribe(NamingClientProxyDelegate.java:146) ~[nacos-client-2.0.2.jar!/:na]
at com.alibaba.nacos.client.naming.NacosNamingService.subscribe(NacosNamingService.java:393) ~[nacos-client-2.0.2.jar!/:na]
at com.alibaba.cloud.nacos.discovery.NacosWatch.start(NacosWatch.java:123) ~[spring-cloud-starter-alibaba-nacos-discovery-2.2.5.RELEASE.jar!/:2.2.5.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182) ~[spring-context-5.2.12.RELEASE.jar!/:5.2.12.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor.access0(DefaultLifecycleProcessor.java:53) ~[spring-context-5.2.12.RELEASE.jar!/:5.2.12.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360) ~[spring-context-5.2.12.RELEASE.jar!/:5.2.12.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158) ~[spring-context-5.2.12.RELEASE.jar!/:5.2.12.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122) ~[spring-context-5.2.12.RELEASE.jar!/:5.2.12.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:895) ~[spring-context-5.2.12.RELEASE.jar!/:5.2.12.RELEASE]
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.finishRefresh(ReactiveWebServerApplicationContext.java:129) ~[spring-boot-2.2.13.RELEASE.jar!/:2.2.13.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:554) ~[spring-context-5.2.12.RELEASE.jar!/:5.2.12.RELEASE]
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66) ~[spring-boot-2.2.13.RELEASE.jar!/:2.2.13.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.13.RELEASE.jar!/:2.2.13.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405) ~[spring-boot-2.2.13.RELEASE.jar!/:2.2.13.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.13.RELEASE.jar!/:2.2.13.RELEASE]
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140) ~[spring-boot-2.2.13.RELEASE.jar!/:2.2.13.RELEASE]
at com.shanyousz.core.launch.ShanyouszApplication.run(ShanyouszApplication.java:35) ~[shanyousz-core-launch-1.0.2-RELEASE.jar!/:na]
at com.shanyousz.gateway.GateWayApplication.main(GateWayApplication.java:21) ~[classes!/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[shanyousz-gateway.jar:na]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[shanyousz-gateway.jar:na]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[shanyousz-gateway.jar:na]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) ~[shanyousz-gateway.jar:na]
Caused by: com.alibaba.nacos.api.exception.NacosException: Nacos cluster is running with 1.X mode, can't accept gRPC request temporarily. Please check the server status or close Double write to force open 2.0 mode. Detail https://nacos.io/en-us/docs/2.0.0-upgrading.html.
at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.requestToServer(NamingGrpcClientProxy.java:219) ~[nacos-client-2.0.2.jar!/:na]
... 27 common frames omitted
异常:Nacos cluster is running with 1.X mode, can't accept gRPC request temporarily. Please check the server status or close Double write to force open 2.0 mode. Detail https://nacos.io/en-us/docs/2.0.0-upgrading.html.
原因:
Nacos2.0版本因为考虑1.x版本的升级用户。所以2.0版本启动时必须先以1.X模式启动。当集群中所有nacos client节点都达到可升级至2.0的状态时,才自动升级成2.0模式。 所以在成功升级2.0模式之前,用grpc注册的服务,在1.X模式下看不到。官方文档截图如下:
解决方案:
1、检查所有Nacos client 节点是否都已正常启动
2、更换 Nacos2.1版本
Nacos 2.1版本默认关闭从1.x版本升级。
参考nacos 2.0.0-bugfix版本,选主失败,此时nacos-client-2.0.0版本服务注册成功,但是控制台不显示 · Issue #5361 · alibaba/nacos · GitHubhttps://github.com/alibaba/nacos/issues/5361
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)