Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consumer is shutting down and this call is going to be stopped without receiving any result #6294

Closed
sailsgo opened this issue Jun 9, 2020 · 18 comments

Comments

@sailsgo
Copy link

sailsgo commented Jun 9, 2020

问题描述

  • 消费者中途报错,提示java.lang.IllegalStateException: Consumer is shutting down and this call is going to be stopped without receiving any result, usually this is called by a slow provider instance or bad service implementation.
  • 这个任务执行时间长,我们配置了比较长的超时时间,但是报错的时候,并没有达到超时时间

环境

  • Dubbo version:2.7.5
  • Operating System version:centos7
  • Java version:1.8.0_141

堆栈

Caused by: java.lang.IllegalStateException: Consumer is shutting down and this call is going to be stopped without receiving any result, usually this is called by a slow provider instance or bad service implementation.
        at org.apache.dubbo.common.threadpool.ThreadlessExecutor.shutdownNow(ThreadlessExecutor.java:146) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.remoting.exchange.support.DefaultFuture.closeChannel(DefaultFuture.java:147) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeChannel.close(HeaderExchangeChannel.java:152) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeChannel.close(HeaderExchangeChannel.java:177) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.close(HeaderExchangeClient.java:144) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.rpc.protocol.dubbo.ReferenceCountExchangeClient.close(ReferenceCountExchangeClient.java:164) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.rpc.protocol.dubbo.DubboInvoker.destroy(DubboInvoker.java:148) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.rpc.protocol.AsyncToSyncInvoker.destroy(AsyncToSyncInvoker.java:90) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.destroy(ProtocolFilterWrapper.java:121) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.destroy(ListenerInvokerWrapper.java:89) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.rpc.protocol.InvokerWrapper.destroy(InvokerWrapper.java:61) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.registry.integration.RegistryDirectory.destroyAllInvokers(RegistryDirectory.java:518) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.registry.integration.RegistryDirectory.refreshInvoker(RegistryDirectory.java:276) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.registry.integration.RegistryDirectory.refreshOverrideAndInvoker(RegistryDirectory.java:251) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.registry.integration.RegistryDirectory.notify(RegistryDirectory.java:245) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:423) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:373) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:364) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.lambda$doSubscribe$2(ZookeeperRegistry.java:187) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient$CuratorWatcherImpl.process(CuratorZookeeperClient.java:293) ~[dubbo-2.7.5.jar!/:2.7.5]
        at org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:68) ~[curator-framework-2.12.0.jar!/:?]
        at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:530) ~[zookeeper-3.4.8.jar!/:3.4.8--1]
        at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:505) ~[zookeeper-3.4.8.jar!/:3.4.8--1]
@tswstarplanet
Copy link
Contributor

看起来像是provider下线了,你可以在消费者端设置比较长的超时时间

@sailsgo
Copy link
Author

sailsgo commented Jun 9, 2020

看起来像是provider下线了,你可以在消费者端设置比较长的超时时间

消费端我们已经设置了很长的超时时间,报这个错的时候还没有到我们的超时时间,
而且我查看了provider它还在执行这个任务中,没有重启,也没有挂掉。

@tswstarplanet
Copy link
Contributor

你调用其他接口正常吗?这个接口有什么特殊的吗?

@sailsgo
Copy link
Author

sailsgo commented Jun 9, 2020

你调用其他接口正常吗?这个接口有什么特殊的吗?

有的接口正常,有的不正常,这个相对其他的来说可能就是执行时间比较长吧,但是也不是每次都报

@tswstarplanet
Copy link
Contributor

你服务端是不是也有超时时间,是不是超过了你服务端的超时时间?

@sailsgo
Copy link
Author

sailsgo commented Jun 9, 2020

你服务端是不是也有超时时间,是不是超过了你服务端的超时时间?

你说的是provider吗?provider端没有配置超时时间,只是在Consumer端配置了很长的超时时间

@Congzer
Copy link

Congzer commented Jan 25, 2021

dubbo.registry.address=zookeeper://ip:port,你看下是不是没有zookeeper://这个注册中心的前缀

@zrlw
Copy link
Contributor

zrlw commented Mar 26, 2021

我们也遇到了,服务注册中心是nacos1.2.1,dubbo版本是2.7.5。
A调用B服务多次(连续调用),前几次都成功了,突然就直接抛这个异常出来,我们只有provider设置15秒超时,从A日志看抛异常的这次调用,从调用B开始耗时不到300ms就异常了。
更新一下:应该是B服务被kill了,我们测试脚本没有考虑操作系统启动A服务的耗时,结果A还是启动过程中就把B服务给重启了。(我们在测试B服务重启对A的影响)

@justbeaboy
Copy link

我现在是使用的dubbo 2.7.7 的版本,nacos 用的1.4.1.然后A B服务都成功注册到nacos 上,B服务消费A 服务的时候,出现
java.lang.IllegalStateException: Consumer is shutting down and this call is going to be stopped without receiving any result, usually this is called by a slow provider instance or bad service implementation.

不知道 啥情况了

@15168326318
Copy link

我也出现过和楼主一样的问题。设置的超时是50秒,但还没到50秒就报这个错,正常的话应该超过50秒报超时才正常。 版本是2.7.9.

@zhentt
Copy link

zhentt commented Aug 11, 2021

这个问题楼主找到原因了吗

@CrazyHZM
Copy link
Member

No feedback for a long time, please close the issue temporarily. If there is still a problem, you can reopen it.

@dongfangliyu
Copy link

dongfangliyu commented Jan 15, 2022

同样的问题 有没有解决方案 大佬们
Consumer is shutting down and this call is going to be stopped without receiving any result, usually this is called by a slow provider instance or bad service implementation.

@dongfangliyu
Copy link

dongfangliyu commented Jan 15, 2022 via email

@invokerofmoon
Copy link

各位都是用的什么注册中心呀?nacos吗?

@HTFX-Cloud
Copy link

@sailsgo 您好,这个问题,找到什么原因引起的么?

@dongfangliyu
Copy link

dongfangliyu commented Nov 21, 2022 via email

@DoubleCat-hub
Copy link

注册中心nacos 一样的问题,卡住2天了,有大佬能给点信息吗?
Failed to invoke the method getExportedURLs in the service org.apache.dubbo.rpc.service.GenericService.
Tried 1 times of the providers [10.42.201.228:17014] (1/1) from the registry localhost:9090 on the consumer 192.168.0.67 using the dubbo version 2.7.8.
Last error is: Fail to invoke remote method: $invoke,
provider: dubbo://10.42.201.228:17014/com.alibaba.cloud.dubbo.service.DubboMetadataService?anyhost=true
application=ddll-mms
bind.ip=10.42.201.228
bind.port=17014
check=false
deprecated=false
dubbo=2.0.2
dynamic=true
generic=true
group=ddll-micro
interface=com.alibaba.cloud.dubbo.service.DubboMetadataService
methods=getAllServiceKeys,getServiceRestMetadata,getExportedURLs,getAllExportedURLs
pid=5725
qos.enable=false
reference.filter=-exception,customexception,mdcTrace
register.ip=192.168.0.67
release=2.7.8
remote.application=ddll-micro
retries=-1
revision=2.2.5.RELEASE
service.filter=-exception,customexception,mdcTrace
side=consumer
sticky=false
timeout=15000
timestamp=1673232849489
version=1.0.0, cause: java.lang.IllegalStateException: Consumer is shutting down and this call is going to be stopped without receiving any result, usually this is called by a slow provider instance or bad service implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests