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

check the network,Local site be the preferred one #15189

Open
wants to merge 3 commits into
base: 3.3
Choose a base branch
from

Conversation

Stellar1999
Copy link
Contributor

@Stellar1999 Stellar1999 commented Mar 1, 2025

What is the purpose of the change?

I found an issue: every time I enable the VPN, Dubbo's local address check always picks up the VPN address instead of my machine's actual address. This leads to an incorrect address selection, preventing normal startup.

I found a similar issue reported a long time ago. Here are two ideas I have:

  1. When retrieving the address, check if it is a SiteLocalAddress. If it is, return it directly; otherwise, return a reachable alternative address. (After my development and testing, this solution at least resolves the issue on my computer.)
    2.Add an IP parameter to specify the preferred local network interface instead of relying on the interface name parameter.

Checklist

  • Make sure there is a GitHub_issue field for the change.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Make sure gitHub actions can pass. Why the workflow is failing and how to fix it?

@Stellar1999 Stellar1999 force-pushed the better_get_local_network branch from 02840e8 to 605f72c Compare March 1, 2025 07:45
@codecov-commenter
Copy link

codecov-commenter commented Mar 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.78%. Comparing base (91b005e) to head (03bce58).
Report is 1 commits behind head on 3.3.

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #15189      +/-   ##
============================================
+ Coverage     60.76%   60.78%   +0.02%     
- Complexity    10886    10889       +3     
============================================
  Files          1885     1885              
  Lines         86071    86073       +2     
  Branches      12892    12893       +1     
============================================
+ Hits          52298    52323      +25     
+ Misses        28326    28307      -19     
+ Partials       5447     5443       -4     
Flag Coverage Δ
integration-tests 33.14% <33.33%> (+0.05%) ⬆️
samples-tests 29.19% <33.33%> (+<0.01%) ⬆️
unit-tests 58.92% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Stellar1999 Stellar1999 marked this pull request as ready for review March 3, 2025 12:27
@zrlw
Copy link
Contributor

zrlw commented Mar 3, 2025

<dubbo:protocol name="dubbo" port="20880" host="192.168.1.100"/>
you can use -D.... to choose special ip address.

@zrlw
Copy link
Contributor

zrlw commented Mar 3, 2025

@Stellar1999
Copy link
Contributor Author

<dubbo:protocol name="dubbo" port="20880" host="192.168.1.100"/> you can use -D.... to choose special ip address.

You're right, @zrlw. This solves the protocol problem, but there are still some display issues and the need to consider whether there are other related issues. Also, I think we still need to consider the first tip.

@zrlw
Copy link
Contributor

zrlw commented Mar 4, 2025

There are many complex network scenarios besides VPN. for example, there might be no other way except to specify ip address and port bound to dubbo provider in docker container.

@AlbumenJ
Copy link
Member

AlbumenJ commented Mar 6, 2025

How about register all the available ips to registry and let consumer try all the ips? But this might be a bad design:)

@Stellar1999
Copy link
Contributor Author

How about register all the available ips to registry and let consumer try all the ips? But this might be a bad design:)

I think so:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants