UNABLE TO CONNECT TO COMMAND METRIC STREAM. 问题解决

左心房为你撑大大i 提交于 2019-12-04 20:29:25

初次使用SpringCloud Hystrix DashBoard 会出现 Unable to connect to Command Metric Stream

通过启动信息可以看到, 
http://localhost:8181/actuator/hystrix.stream 是404 ,说明在SpringCloud Finchley.SR1 版本中,该访问路径是默认不开启的,所以我们需要手动开启昂

2018-09-03 00:34:19.382  WARN 29124 --- [nio-8181-exec-2] ashboardConfiguration$ProxyStreamServlet : Failed opening connection to http://localhost:8181/actuator/hystrix.stream : 404 : HTTP/1.1 404 
2018-09-03 00:34:19.382  WARN 29124 --- [nio-8181-exec-1] ashboardConfiguration$ProxyStreamServlet : Failed opening connection to http://localhost:8181/actuator/hystrix.stream : 404 : HTTP/1.1 404 

在 application.yml 文件中增加以下配置:

#暴露全部的监控信息
management:
  endpoints:
    web:
      exposure:
        include: "*"

此时再次启动,发现上述错误已经没有了,再次访问监控面板,是loading 状态。。。 

调用feign 服务API,再次查看界面,在 Dashboard 界面即可看到 Hystrix 监控界面:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!