alibaba / alibaba/Sentinel

k8s MetricFetcher [ java.net.NoRouteToHostException: No route to host ]

Open
#3,048 1 comment 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

## Issue Description

Type: *bug report* or *feature request*

### Describe what happened (or what feature you want)
k8s环境部署的Sentinel-dashboard ,pod ip是 172.19.76.231,但是日志显示Sentinel ip是172.19.79.255,以至于 MetricFetcher 报错

#### 报错日志如下:
```
2023-02-22 19:50:49.517 ERROR 1 --- [pool-5-thread-1] c.a.c.s.dashboard.metric.MetricFetcher : fetch system metric http://172.19.79.255:8719/systemStatus error

java.net.NoRouteToHostException: No route to host
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_191]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_191]
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:171) [httpcore-nio-4.4.6.jar!/:4.4.6]
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:145) [httpcore-nio-4.4.6.jar!/:4.4.6]
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) [httpcore-nio-4.4.6.jar!/:4.4.6]
at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:194) [httpasyncclient-4.1.3.jar!/:4.1.3]
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) [httpasyncclient-4.1.3.jar!/:4.1.3]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_191]
```

### Describe what you expected to happen
期望获取正确的pod ip

### How to reproduce it (as minimally and precisely as possible)

### Tell us your environment

1. jdk: 8
2. sentinel : 1.8
3. system : k8s

### Anything else we need to know?

Contributor guide

Open the contributing guide

Research direction

Start with the Sentinel-dashboard MetricFetcher and inspect how the Sentinel IP is discovered in the Kubernetes deployment. Reproduce the reported request to /systemStatus and verify that the dashboard uses the correct pod IP instead of 172.19.79.255, with the route error resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kubernetes
Domain
cloud, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.