hystrix dashboard Unable to connect to Command Metric Stream解决办法
dashboard
General-purpose web UI for Kubernetes clusters
项目地址:https://gitcode.com/gh_mirrors/da/dashboard
·
hystrix dashboard Unable to connect to Command Metric Stream解决办法
大家好我是酷酷的韩~ 下面是遇到的在springcloud熔断器监测中出现以上错误的解决办法。
1.首先查看依赖是否配置全
<!--熔断器-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>
<!--熔断可视化组件-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
2.检查启动类是否有如下注解
@EnableCircuitBreaker //断路器
@EnableHystrixDashboard //断路器可视化
3.如果都没问题那么检查下springboot 版本如果是2.0则需要添加 ServletRegistrationBean 因为springboot的默认路径不是 “/hystrix.stream”,只要在自己的项目里配置上下面的servlet就可以了。
@Bean
public ServletRegistrationBean getServlet() {
HystrixMetricsStreamServlet streamServlet = new HystrixMetricsStreamServlet();
ServletRegistrationBean registrationBean = new ServletRegistrationBean(streamServlet);
registrationBean.setLoadOnStartup(1);
registrationBean.addUrlMappings("/hystrix.stream");
registrationBean.setName("HystrixMetricsStreamServlet");
return registrationBean;
}
4.启动熔断器可视化界面
输入地址http:ip:port/hystrix ,如下界面:
男儿不展风云志,空负天生八尺躯。------酷酷的韩
General-purpose web UI for Kubernetes clusters
最近提交(Master分支:2 个月前 )
49406263
* chore(chart): release 7.14.0
* chore(code): fix lint
* chore(go): bump Go version to 1.24.0 and update module dependencies
* chore(go): update used go version to 1.24.0
* chore(docker): update base image to golang:1.24-alpine3.22 across all Dockerfiles 1 个月前
7bb09004
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.2 to 5.5.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v5.4.2...v5.5.1)
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-version: 5.5.1
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 1 个月前
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐



所有评论(0)