Skip to content

[Bug] NetUtils should ignore the local link address #14792

@cyclinder

Description

@cyclinder

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

Any

Steps to reproduce this issue

In the K8S scenario, some applications may have two NICs, eth0 and veth0, and eth0 is configured with a real physical address. veth0 is configured with a local link address, which may randomly select the local link address to veth0, resulting in unavailability of the service.

When I look at the netUtils code, I see that netutils only ignores the lookback address, not the local link address.

https://github.com/mercyblitz/dubbo/blob/d8a4acd13c8270bdefe38f8b109dee457ee15593/dubbo-common/src/main/java/org/apache/dubbo/common/utils/NetUtils.java#L148

What you expected to happen

NetUtils should ignore the local link address

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

Assignees

Labels

help wantedEverything needs help from contributorstype/enhancementEverything related with code enhancement or performance

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions