开发者社区 > 云原生 > 正文

nacos客户端每间隔10秒打印一次异常信息

com.alibaba.nacos.shaded.io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason at com.alibaba.nacos.shaded.io.grpc.Status.asRuntimeException(Status.java:533) at com.alibaba.nacos.shaded.io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:442) at com.alibaba.nacos.shaded.io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at com.alibaba.nacos.shaded.io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at com.alibaba.nacos.shaded.io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at com.alibaba.nacos.shaded.io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:700) at com.alibaba.nacos.shaded.io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at com.alibaba.nacos.shaded.io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at com.alibaba.nacos.shaded.io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at com.alibaba.nacos.shaded.io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:399) at com.alibaba.nacos.shaded.io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:510) at com.alibaba.nacos.shaded.io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:66) at com.alibaba.nacos.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:630) at com.alibaba.nacos.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:518) at com.alibaba.nacos.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:692) at com.alibaba.nacos.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:681) at com.alibaba.nacos.shaded.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at com.alibaba.nacos.shaded.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)

2021-10-13 11:34:03.821 INFO [user,,] 2304 --- [t.remote.worker] com.alibaba.nacos.common.remote.client : [636d0779-244d-45ee-9e52-ba7bc4588af6_config-0] try to re connect to a new server ,server is not appointed,will choose a random server. 2021-10-13 11:34:03.974 INFO [user,,] 2304 --- [t.remote.worker] com.alibaba.nacos.common.remote.client : [636d0779-244d-45ee-9e52-ba7bc4588af6_config-0] success to connect a server [nacos.gzzhongka.cn:8848],connectionId=1634096043826_127.0.0.1_43982 2021-10-13 11:34:03.974 INFO [user,,] 2304 --- [t.remote.worker] com.alibaba.nacos.common.remote.client : [636d0779-244d-45ee-9e52-ba7bc4588af6_config-0] Abandon prev connection ,server is nacos.gzzhongka.cn:8848, connectionId is 1634096033820_127.0.0.1_42082 2021-10-13 11:34:03.974 INFO [user,,] 2304 --- [t.remote.worker] com.alibaba.nacos.common.remote.client : [636d0779-244d-45ee-9e52-ba7bc4588af6_config-0]Notify disconnected event to listeners 2021-10-13 11:34:03.974 INFO [user,,] 2304 --- [t.remote.worker] c.a.n.client.config.impl.ClientWorker : [636d0779-244d-45ee-9e52-ba7bc4588af6_config-0] DisConnected,clear listen context... 2021-10-13 11:34:03.974 INFO [user,,] 2304 --- [t.remote.worker] com.alibaba.nacos.common.remote.client : [636d0779-244d-45ee-9e52-ba7bc4588af6_config-0]Notify connected event to listeners. 2021-10-13 11:34:03.974 INFO [user,,] 2304 --- [t.remote.worker] c.a.n.client.config.impl.ClientWorker : [636d0779-244d-45ee-9e52-ba7bc4588af6_config-0] Connected,notify listen context...

每间隔10s会打印一次这种日志,但是服务表现是正常的。网关可以通过服务发现把请求转发进来并且可以正常响应

在同一台linux上一个服务启动了两个实例,比如user服务

20011端口启动一个实例 20012端口启动一个实例

但是这两个实例只有一个实例的日志会打印上述异常。并且请求都可以通过服务发现进入上述两个实例,除了一个实例打印异常外看不出其他区别

OS: [e.g. CentOS Linux release 7.9.2009 (Core)] Version [e.g. nacos-server 2.0.3, nacos-client 2.0.3] Module [e.g. naming/config] SDK [e.g. original, spring-cloud-alibaba-nacos 2.0.3, spring-boot 2.5.5, spring-cloud 3.0.4, jdk-11 ]

nacos-server是集群模式

原提问者GitHub用户FreeSaltedFish

展开
收起
学习娃 2023-05-22 16:15:12 298 0
1 条回答
写回答
取消 提交回答
  • 应该是网络环境有问题,连接被断开了,看下有没有经过什么vip,vpn之类的。

    原回答者GitHub用户KomachiSion

    2023-05-23 09:35:21
    赞同 展开评论 打赏

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关电子书

更多
Nacos架构&原理 立即下载
workshop专场-微服务专场-开发者动手实践营-微服务-使用Nacos进行服务的动态发现和流量调度 立即下载
Nacos 启航,发布第一个版本, 云原生时代助力用户微服务平台建设 立即下载