dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

[Bug] Directory of type RegistryDirectory already destroyed for service

Open seqwait opened this issue 1 month ago • 1 comments

Pre-check

  • [x] I am sure that all the content I provide is in English.

Search before asking

  • [x] I had searched in the issues and found no similar issues.

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

openjdk: 1.8 dubbo: 3.2.0

Steps to reproduce this issue

Because Dubbo for Spring Boot starts to destroy itself immediately after receiving the ContextClosedEvent, while the Spring Boot scheduled task (ThreadPoolTaskScheduler) is destroyed later during the DisposableBean.destroy() phase, the destruction order becomes inconsistent.

As a result, Dubbo is destroyed before the scheduled tasks are stopped. If those tasks continue to invoke Dubbo remote services during this period, they will throw the following error:

org.apache.dubbo.rpc.RpcException: Directory of type RegistryDirectory already destroyed for service

What you expected to happen

Support graceful shutdown

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • [ ] Yes I am willing to submit a pull request on my own!

Code of Conduct

seqwait avatar Nov 25 '25 14:11 seqwait

Hello, as a newcomer to open source, I would like to try to contribute. Is this issue still available? If so, I'd love to work on it, could you please assign it to me? Thank you!

zqzlq avatar Dec 06 '25 10:12 zqzlq

@heliang666s could you please assign this issue to me, as I would love contributing to the project by fixing this issue.

arunikayadav42 avatar Dec 16 '25 07:12 arunikayadav42

@arunikayadav42 just go ahead

heliang666s avatar Dec 16 '25 09:12 heliang666s