Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug] Directory of type RegistryDirectory already destroyed for service #15798

@seqwait

Description

@seqwait

Pre-check

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

Search before asking

  • 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

Metadata

Metadata

Labels

help wantedEverything needs help from contributors

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions