dubbo
dubbo copied to clipboard
[Bug] NetUtils should ignore the local link address
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 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?
- [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