wangdechong opened a new issue, #12210: URL: https://github.com/apache/dubbo/issues/12210
<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy --> - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate. ## Ask your question here 环境: springboot2.7+dubbo:3.1.6 双协议注册:dubbo和rest协议 注册中心nacos:服务端版本NACOS2.0.4,客户端版本2.2.0 容器:k8s 优雅上下线问题: 下线问题:k8s上扩缩容pod时,提供者无法优雅停机,pod强制停机。(已配置dubbo.shutdownHook.listenIgnore=true和dubbo.service.shutdown.wait=30000);同时出现ErrCode:-401, ErrMsg:Client not connected, current status:SHUTDOWN;消费者出现500错误。 上线问题:postMan通过http方式调用rest协议接口时,项目启动过程中o.apache.catalina.core.StandardService : Starting service [Tomcat],项目还未Started Application,这时就有请求进来,造成404错误;k8s已设置就绪检查,健康检查接口通过rest协议接口实现(成功时http状态码200); 错误信息: [DUBBO] Failed to unsubscribe dubbo://172.20.2.85/com.dds.drivertradecenter.api.facade.AccountFacade?actives=5&application=dds-ats-consumer&background=false&category=providers,configurators,routers&check=false&cluster=failfast&dubbo=2.0.2&interface=com.dds.drivertradecenter.api.facade.AccountFacade&logger=slf4j&metadata-type=remote&methods=getAccountWallet,getBatchAccountWallet,tradeBalanceToEarnest,tradeEarnestMoney,tradeEarnestToBalance,tradeFreezeMoney,tradeMoney,tradeMoneyEarnest&organization=com.dds&pid=1&protocol=dubbo&qos.enable=true&reference.filter=tracing®ister-mode=instance&release=3.1.6&retries=0&revision=1.0.0&side=consumer&sticky=false×tamp=1682255284561&unloadClusterRelated=false&version=1.0.0 to nacos nacos://localhost:8848/org.apache.dubbo.registry.RegistryService?application=dds-ats-consumer&dubbo=2.0.2&interface=org.apache.dubbo.registry.RegistryService&logger=slf4j&metadata-type=remote&organization=com.dds&pid=1&qos.enable=true®ister-mode=instance&re lease=3.1.6, cause: Client not connected, current status:SHUTDOWN, dubbo version: 3.1.6, current host: 172.20.2.85, error code: 1-37. This may be caused by , go to https://dubbo.apache.org/faq/1/37 to find instructions. , 详细错误信息如下 ErrCode:-401, ErrMsg:Client not connected, current status:SHUTDOWN at com.alibaba.nacos.common.remote.client.RpcClient.request(RpcClient.java:639) at com.alibaba.nacos.common.remote.client.RpcClient.request(RpcClient.java:619) at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.requestToServer(NamingGrpcClientProxy.java:356) at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.doUnsubscribe(NamingGrpcClientProxy.java:341) at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.unsubscribe(NamingGrpcClientProxy.java:322) at com.alibaba.nacos.client.naming.remote.NamingClientProxyDelegate.unsubscribe(NamingClientProxyDelegate.java:184) at com.alibaba.nacos.client.naming.NacosNamingService.unsubscribe(NacosNamingService.java:438) at com.alibaba.nacos.client.naming.NacosNamingService.unsubscribe(NacosNamingService.java:424) at org.apache.dubbo.registry.nacos.NacosNamingServiceWrapper.lambda$unsubscribe$1(NacosNamingServiceWrapper.java:63) at org.apache.dubbo.registry.nacos.NacosNamingServiceWrapper.accept(NacosNamingServiceWrapper.java:146) at org.apache.dubbo.registry.nacos.NacosNamingServiceWrapper.unsubscribe(NacosNamingServiceWrapper.java:63) at org.apache.dubbo.registry.nacos.NacosRegistry.unsubscribeEventListener(NacosRegistry.java:589) at org.apache.dubbo.registry.nacos.NacosRegistry.doUnsubscribe(NacosRegistry.java:294) at org.apache.dubbo.registry.nacos.NacosRegistry.doUnsubscribe(NacosRegistry.java:281) at org.apache.dubbo.registry.support.FailbackRegistry.unsubscribe(FailbackRegistry.java:334) at org.apache.dubbo.registry.ListenerRegistryWrapper.unsubscribe(ListenerRegistryWrapper.java:99) at org.apache.dubbo.registry.integration.DynamicDirectory.destroy(DynamicDirectory.java:312) at org.apache.dubbo.registry.integration.RegistryDirectory.destroy(RegistryDirectory.java:142) at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.destroy(AbstractClusterInvoker.java:129) at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.destroy(MockClusterInvoker.java:88) at org.apache.dubbo.registry.client.migration.MigrationInvoker.destroy(MigrationInvoker.java:326) at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:61) at com.dds.drivertradecenter.api.facade.AccountFacadeDubboProxy0.$destroy(AccountFacadeDubboProxy0.java) at org.apache.dubbo.config.utils.SimpleReferenceCache.destroyReference(SimpleReferenceCache.java:266) at org.apache.dubbo.config.utils.SimpleReferenceCache.lambda$destroyAll$4(SimpleReferenceCache.java:255) at java.base/java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1603) at org.apache.dubbo.config.utils.SimpleReferenceCache.destroyAll(SimpleReferenceCache.java:253) at org.apache.dubbo.config.deploy.DefaultModuleDeployer.unreferServices(DefaultModuleDeployer.java:415) at org.apache.dubbo.config.deploy.DefaultModuleDeployer.postDestroy(DefaultModuleDeployer.java:221) at org.apache.dubbo.rpc.model.ModuleModel.onDestroy(ModuleModel.java:108) at org.apache.dubbo.rpc.model.ScopeModel.destroy(ScopeModel.java:115) at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onContextClosedEvent(DubboDeployApplicationListener.java:132) at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:104) at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:47) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) at org.springframework.context.support.AbstractApplicationContext -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
