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] consumer cannot be registered #14844

Open
4 tasks done
eduosi opened this issue Nov 1, 2024 · 6 comments
Open
4 tasks done

[Bug] consumer cannot be registered #14844

eduosi opened this issue Nov 1, 2024 · 6 comments
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage

Comments

@eduosi
Copy link

eduosi commented Nov 1, 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

Dubbo java 3.3.x

Steps to reproduce this issue

The consumer side cannot register with the registry center.

What you expected to happen

图片

The isValidInstance always returns false. Because ServiceInstance.getHost() always returns null, and instance.getPort() always returns -1.

图片

Because there is no definition of the @ DubboService ServiceInstance. GetServiceMetadata () collectExportedURLSet () always returns empty. So, the values of DefaultServiceInstance host and port cannot be updated.

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

@eduosi eduosi added component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage labels Nov 1, 2024
@wcy666103
Copy link
Contributor

Can you provide a demo that is stable to reproduce?
Are you willing to resolve this issue by submitting a pr?

@eduosi
Copy link
Author

eduosi commented Nov 1, 2024

Can you provide a demo that is stable to reproduce? Are you willing to resolve this issue by submitting a pr?

Q1. Yes, tonight I'll create a simple example to reproduce the problem.
Q2. I can try, because I need to modify the service registration logic, which may conflict with the existing registration logic design.

@eduosi
Copy link
Author

eduosi commented Nov 1, 2024

Can you provide a demo that is stable to reproduce? Are you willing to resolve this issue by submitting a pr?

dubbo-test.zip

图片 图片

This is a simple demo. Run with dubbo-test-consumer.

@QingJuBaiTang
Copy link
Contributor

If no Dubbo service is defined, the service will not be registered. I always thought that Dubbo was designed this way, isn't it?

@eduosi
Copy link
Author

eduosi commented Nov 2, 2024

If no Dubbo service is defined, the service will not be registered. I always thought that Dubbo was designed this way, isn't it?

It depends on how it's designed. But, this description is not found in the documentation. Moreover, the description of the configuration item dubbo.application.register-consumer in the documentation is easily misleading.

@eduosi
Copy link
Author

eduosi commented Nov 2, 2024

If no Dubbo service is defined, the service will not be registered. I always thought that Dubbo was designed this way, isn't it?

图片

dubbo.application.register-consumer also does not have absolute control over whether a service is registered.

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