alibaba / alibaba/Sentinel

VirtualBox(vbox)虚拟网卡和物理网卡同时存在时,sentinel获取ip出错。

Open
#1,596 5 comments 0 reactions 0 assignees View on GitHub
kind/question
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

### VirtualBox(vbox)虚拟网卡和物理网卡同时存在时,sentinel获取ip出错,问题细节描述如下:
1.在A主机上运行sentinel;
2.在B主机(物理机)上运行需要被监测流量的应用 app1;
3.在B主机上同时存在物理网卡和虚拟网卡(VirtualBox Host-Only Network),并运行 app1;
4.在A主机sentinel的控制面板(控制台)上获取的机器列表中: 取得的是app1所在主机B的虚拟网卡 VirtualBox Host-Only Network的地址,从而造成监测失败;
5.错误在于sentinel不应该取得B主机虚拟网卡ip, 而应该取得物理网卡ip,因为app1运行在物理机中。

【临时解决方法】:
把虚拟网卡 VirtualBox Host-Only Network 禁用即可,希望大神能从代码层面解决这个问题。据测试VMware的虚拟网卡不会出现类似的问题。

Contributor guide

Open the contributing guide

Research direction

Start by tracing Sentinel's machine-list IP discovery and reproduce the failure with a physical interface and a VirtualBox Host-Only Network adapter enabled. Determine why the virtual adapter is selected; done means the physical host IP is selected and monitoring works without disabling the virtual adapter.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.