Failed to fetch metric from <http://172.19.112.1:8719/metric?startTime=1752501646000&endTime=1752501652000&refetch=false> (ConnectionException: Operation timed out

 在docker中运行sentinel应用后,windows本地启动sentinel客户端,此时sentinel报错,显示请求http://172.19.112.1:8719/metric 接口报错,这是因为sentinel应用 从 sentinel客户端拉去限流等信息时报错,因为sentinel应用 部署在 docker中,而sentinel客户端在宿主机 windows,属于不同网络,需要统一网络或者强制制定宿主机ip,如下

 在本地springboot应用的bootstrap.yml配置中增加

client-ip: 192.168.1.4 
后,运行正常
posted @ 2025-07-15 09:04  Hsinyung  阅读(77)  评论(0)    收藏  举报