搭建Hystrix Dashboard一直加载不出

本文档描述了在搭建Spring Cloud Hystrix Dashboard时遇到的加载问题。启动Hystrix监控服务端和被监控的客户端后,Hystrix.stream页面持续加载。问题在于需要手动请求被监控的服务端口(例如http://localhost:9000/ribbon-consumer/),之后监控页面才会显示请求信息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

搭建:
监控服务端

     <!--断路器-->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-hystrix</artifactId>
            </dependency>
            <!-- 仪表盘-->
    
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
            </dependency>
            <!--监控-->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-actuator</artifactId>
            </dependency>
 @EnableHystrixDashboard
 @SpringBootApplication
 public class Application {
     public static void main(String[] args) {
         new SpringApplicationBuilder(Application.class).web(true).run(args);
     }
 }
  spring.application.name = dashboard
  server.port=8999

被监控的客户端

      <!--容错保护-->
          <dependency>
              <groupId>org.springframework.cloud</groupId>
              <artifactId>spring-cloud-starter-hystrix</artifactId>
          </dependency>
    
    
          <!--监控-->
          <dependency>
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-actuator</artifactId>
          </dependency>
//服务发现的能力
@EnableCircuitBreaker

启动之前的项目
ribbon-consumer
本机搭建spring cloub的高可用Eureka 出现available-replicas为空

新建的dashboard监控服务端

启动监控后进入hystrix.stream页面,发现一直在加载中
在这里插入图片描述在这里插入图片描述
原因:刚启动是这样的,需要手动请求要监控的端口服务
http://localhost:9000/ribbon-consumer/
在这里插入图片描述
然后监控页面显示刚才的请求信息
在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值