alibaba / alibaba/Sentinel

If have multiple network adapters. Multiple clients need to manually set different `spring.cloud.sentinel.transport.client-ip`

Open
#1,361 11 comments 0 reactions 0 assignees View on GitHub
area/dashboard kind/discussion
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

### Issue Description

If have multiple network adapters. [`com.alibaba.csp.sentinel.util.HostNameUtil#resolveHost()`](https://github.com/alibaba/Sentinel/blob/master/sentinel-core/src/main/java/com/alibaba/csp/sentinel/util/HostNameUtil.java#L44) May get an incorrect IP.
It will cause the sentinel-dashboard server to fail to connect to the client.

### Describe what happened

Multiple clients need to manually set different `spring.cloud.sentinel.transport.client-ip`. A bit difficult

### Describe what you expected to happen

Is it possible to get `spring.cloud.sentinel.transport.client-ip` through the sentry-dashboard server.

---

### 问题描述

如果有多个网络适配器. [`com.alibaba.csp.sentinel.util.HostNameUtil#resolveHost()`](https://github.com/alibaba/Sentinel/blob/master/sentinel-core/src/main/java/com/alibaba/csp/sentinel/util/HostNameUtil.java#L44) 可能会获得一个不正确的 IP, 会导致 sentinel-dashboard 服务端不能连接到客户端.

### 发生了

多个客户端都要手动设置不同的 `spring.cloud.sentinel.transport.client-ip`, 有一点难受.

### 期望发生的事情

是否能够通过 sentinel-dashboard 服务端, 获得 `spring.cloud.sentinel.transport.client-ip`.

Contributor guide

Open the contributing guide

Research direction

Start with com.alibaba.csp.sentinel.util.HostNameUtil#resolveHost() in sentinel-core/src/main/java/com/alibaba/csp/sentinel/util/HostNameUtil.java and trace how the Sentinel Dashboard connects to clients. Define how the dashboard can obtain the client IP when multiple network adapters are present, with completion indicated by clients no longer needing separate manual spring.cloud.sentinel.transport.client-ip values.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.