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

[master] Simplify and unify local address getting method #8679

Merged
merged 2 commits into from Sep 8, 2021

Conversation

zrlw
Copy link
Contributor

@zrlw zrlw commented Sep 4, 2021

What is the purpose of the change

fix #8676 on master

@codecov-commenter
Copy link

codecov-commenter commented Sep 4, 2021

Codecov Report

Merging #8679 (eb6ccf6) into master (7d95364) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #8679      +/-   ##
============================================
- Coverage     61.03%   61.03%   -0.01%     
+ Complexity      448      447       -1     
============================================
  Files          1097     1097              
  Lines         44398    44376      -22     
  Branches       6466     6459       -7     
============================================
- Hits          27098    27084      -14     
+ Misses        14317    14316       -1     
+ Partials       2983     2976       -7     
Impacted Files Coverage Δ
...n/java/org/apache/dubbo/common/utils/NetUtils.java 69.00% <100.00%> (-0.31%) ⬇️
...in/java/org/apache/dubbo/config/ServiceConfig.java 70.12% <100.00%> (+3.55%) ⬆️
...in/java/org/apache/dubbo/common/utils/JVMUtil.java 81.13% <0.00%> (-11.33%) ⬇️
...he/dubbo/remoting/transport/netty/NettyServer.java 70.17% <0.00%> (-3.51%) ⬇️
...he/dubbo/registry/multicast/MulticastRegistry.java 64.18% <0.00%> (-3.26%) ⬇️
...ubbo/registry/support/AbstractRegistryFactory.java 83.09% <0.00%> (-2.82%) ⬇️
.../dubbo/remoting/transport/netty4/NettyChannel.java 62.37% <0.00%> (-1.99%) ⬇️
...e/dubbo/remoting/transport/netty4/NettyClient.java 69.56% <0.00%> (-1.45%) ⬇️
...pache/dubbo/registry/support/AbstractRegistry.java 77.40% <0.00%> (-0.75%) ⬇️
...g/apache/dubbo/registry/consul/ConsulRegistry.java 60.00% <0.00%> (-0.59%) ⬇️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d95364...eb6ccf6. Read the comment docs.

@AlbumenJ AlbumenJ merged commit 233be16 into apache:master Sep 8, 2021
@zhlking
Copy link

zhlking commented Jan 20, 2022

我们使用的docker swam集群,2.7.14版本之前能获取到容器swarm网络的IP,现在获取的是本地虚拟网桥段的地址,这个IP地址只能够本机访问,跨主机是不能访问的。代码更新后功能有问题,需要回退。

@K12273
Copy link

K12273 commented Jan 21, 2022

@zhlking
我们使用的docker swam集群,升级到2.7.15版本,出现同样的问题

@zrlw
Copy link
Contributor Author

zrlw commented Jan 21, 2022

加一个 -DDUBBO_IP_TO_BIND=x.x.x.x 启动参数应该可以解决, 具体原因见 #8676 后面的解释。

@K12273
Copy link

K12273 commented Jan 21, 2022

加一个 -DDUBBO_IP_TO_BIND=x.x.x.x 启动参数应该可以解决, 具体原因见 #8676 后面的解释。

尝试过,但是我们这里容器调度使用 DockerSwarm stack模式启动容器,宿主机的IP是动态的,实际场景不适合通过 -DDUBBO_IP_TO_BIND 写死主机IP Docker Swarm 的compose stack模式部署的容器不支持内置变量传递

@zrlw
Copy link
Contributor Author

zrlw commented Jan 21, 2022

可以看一下ifmetric ,如果能把想要用的网络接口的优先级metric设为最小应该也能解决问题。

@K12273
Copy link

K12273 commented Jan 21, 2022

可以看一下ifmetric ,如果能把想要用的网络接口的优先级metric设为最小应该也能解决问题。
还有别的方式吗 这种工作量太多 上百台服务器

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.

None yet

5 participants