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

[Bug] Registry check does not work in the case of multiple registrations and subscriptions at the application level, and provider export error causes Dubbo to fail to start #15003

Open
4 tasks done
huangqy17 opened this issue Dec 16, 2024 · 10 comments
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage

Comments

@huangqy17
Copy link

huangqy17 commented Dec 16, 2024

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

dubbo3.2.16;
jdk openjdk21

Steps to reproduce this issue

Dubbo3.2.16 uses two Nacos clusters as registration centers to implement application level multi subscription and multi subscription, and configure regirty.check=false. When one of the Nacos clusters is unavailable, dubbo serviceConfig. export reports an error causing startup failure, with the error message 'this.registry is null'

What you expected to happen

When a Nacos cluster is unavailable, it should be possible to export services normally on another Nacos cluster and ignore the other Nacos cluster

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

@huangqy17 huangqy17 added component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage labels Dec 16, 2024
@walkinggo
Copy link
Contributor

Can you show the complete error message?

@huangqy17
Copy link
Author

ServiceConfig#doExportUrl -> RegistryProtocol#export方法中,this.getRegistry(registryUrl)获得的Registry 是null,后面的逻辑没有判断这个值是否null,在RegistryProtocol#register方法中报空指针异常

@huangqy17
Copy link
Author

其他场景也有类似的问题,有的场景会判断Registry是否为null,而正常结束; 有的就类似现在启动export时报空指针异常

@huangqy17
Copy link
Author

我这个是多注册中心的高可用场景,如果多注册支持高可用的话,这里循环其中一个注册中心不应该异常退出

@huangqy17
Copy link
Author

Uploading dubbo配置.jpg…
配置如图

@huangqy17
Copy link
Author

dubbo配置

@walkinggo
Copy link
Contributor

是的,我查看了这个问题,并确定它是存在的。我们应该提交一个合并请求来修复它。 @AlbumenJ

@huangqy17
Copy link
Author

大佬 有计划什么时候修复吗 @AlbumenJ @walkinggo

@AlbumenJ
Copy link
Member

AlbumenJ commented Jan 5, 2025

Add a configuration like checkThreshold in MultipleRegistry may works. Are there anyone want to contribute?

@huangqy17
Copy link
Author

大佬 帮看下我们的诉求是否和你们的设计初衷一样,我们的诉求是:在多注册中心下,如果全部注册中心或者部分注册中心可用,则export成功且启动成功,如果全部注册中心不可用,则异常结束让开发人员感知到

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage
Projects
Status: Todo
Development

No branches or pull requests

3 participants