apache / apache/dubbo

[Bug] consumer cannot be registered

Open
#14,844 6 comments 0 reactions 0 assignees View on GitHub
component/need-triage type/need-triage
Dominant language
Java
Stars
41.6k
Forks
26.4k
Avg merge
15h 13m
Merged PRs (30d)
4

Description

### 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](https://github.com/apache/dubbo/issues?q=is%3Aissue) 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

![图片](https://github.com/user-attachments/assets/f7f1a4b2-d001-4d87-b845-c6b80f1fbb77)

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

![图片](https://github.com/user-attachments/assets/e6e21599-a989-4167-a817-27d867f29ccf)

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?

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

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.