搭建Hystrix Dashboard一直加载不出

搭建:
监控服务端

     
            <dependency>
                <groupId>org.springframework.cloudgroupId>
                <artifactId>spring-cloud-starter-hystrixartifactId>
            dependency>
            
    
            <dependency>
                <groupId>org.springframework.cloudgroupId>
                <artifactId>spring-cloud-starter-hystrix-dashboardartifactId>
            dependency>
            
            <dependency>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-actuatorartifactId>
            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.cloudgroupId>
              <artifactId>spring-cloud-starter-hystrixartifactId>
          dependency>
    
    
          
          <dependency>
              <groupId>org.springframework.bootgroupId>
              <artifactId>spring-boot-actuatorartifactId>
          dependency>
//服务发现的能力
@EnableCircuitBreaker

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

新建的dashboard监控服务端

启动监控后进入hystrix.stream页面,发现一直在加载中
搭建Hystrix Dashboard一直加载不出_第1张图片搭建Hystrix Dashboard一直加载不出_第2张图片
原因:刚启动是这样的,需要手动请求要监控的端口服务
http://localhost:9000/ribbon-consumer/
搭建Hystrix Dashboard一直加载不出_第3张图片
然后监控页面显示刚才的请求信息
搭建Hystrix Dashboard一直加载不出_第4张图片
搭建Hystrix Dashboard一直加载不出_第5张图片

你可能感兴趣的:(springcloud)