We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Java SDK (apache/dubbo)
2.7.22
springboot项目集成dubbo 2.7.22, dubbo.xml有dubbo:reference引用,类似于 <dubbo:reference interface="com.xdd.test.demo44.remote.IUserServiceRemote" id="userServiceRemote"/> 启动springboot后,然后观查java.lang.ApplicationShutdownHooks.hooks变量,会多出一个DubboShutdownHook对象
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean先执行了DubboShutdownHook.getDubboShutdownHook().unregister()
给bean的属性赋值时org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean 再执行DubboShutdownHook.getDubboShutdownHook().register()
顺序搞反了,导致consumer启动后一直会有DubboShutdownHook这个勾子,在consumer停止的时候,DubboShutdownHook可能会优先于SpringApplicationShutdownHook执行,把没有执行完的任务直接关闭,出现Interrupted unexpectedly while waiting for异常 。
好像也看到类似的问题,不过不是这个版本https://github.com/apache/dubbo/issues/7093。
dubbo2.7.3是没有这个bug的。
我现在的解决方法是在springboot启动后,直接调用DubboShutdownHook.getDubboShutdownHook().unregister();
The text was updated successfully, but these errors were encountered:
Please re-submit this pr in english only.
Sorry, something went wrong.
No branches or pull requests
Pre-check
Search before asking
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
2.7.22
Steps to reproduce this issue
springboot项目集成dubbo 2.7.22, dubbo.xml有dubbo:reference引用,类似于 <dubbo:reference interface="com.xdd.test.demo44.remote.IUserServiceRemote" id="userServiceRemote"/>
启动springboot后,然后观查java.lang.ApplicationShutdownHooks.hooks变量,会多出一个DubboShutdownHook对象
What you expected to happen
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean先执行了DubboShutdownHook.getDubboShutdownHook().unregister()
给bean的属性赋值时org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean 再执行DubboShutdownHook.getDubboShutdownHook().register()
顺序搞反了,导致consumer启动后一直会有DubboShutdownHook这个勾子,在consumer停止的时候,DubboShutdownHook可能会优先于SpringApplicationShutdownHook执行,把没有执行完的任务直接关闭,出现Interrupted unexpectedly while waiting for异常
。
Anything else
好像也看到类似的问题,不过不是这个版本https://github.com/apache/dubbo/issues/7093。
dubbo2.7.3是没有这个bug的。
我现在的解决方法是在springboot启动后,直接调用DubboShutdownHook.getDubboShutdownHook().unregister();
Are you willing to submit a pull request to fix on your own?
Code of Conduct
The text was updated successfully, but these errors were encountered: