springboot2.0下hystrix dashboard Unable to connect to Command Metric Stream解决办法

springboot2.0下hystrix dashboard Unable to connect to Command Metric Stream解决办法

检查hystrix应用的配置:

management:
  endpoints:
    web:
      exposure:

        include: hystrix.stream

pom.xml文件里:必须有如下内容:

     <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>

        </dependency>

hystrix-dash应用里面:注意地址为/actuator/hystrix.stream

成功标识:

Fetching instance list for apps: [hystrix, customer]
[2m2018-05-14 23:30:36.379[0;39m [32m INFO[0;39m [35m10622[0;39m [2m---[0;39m [2m[        Timer-0][0;39m [36mo.s.c.n.turbine.EurekaInstanceDiscovery [0;39m [2m:[0;39m Fetching instances for app: hystrix
[2m2018-05-14 23:30:36.379[0;39m [32m INFO[0;39m [35m10622[0;39m [2m---[0;39m [2m[        Timer-0][0;39m [36mo.s.c.n.turbine.EurekaInstanceDiscovery [0;39m [2m:[0;39m Received instance list for app: hystrix, size=1
[2m2018-05-14 23:30:36.379[0;39m [32m INFO[0;39m [35m10622[0;39m [2m---[0;39m [2m[        Timer-0][0;39m [36mo.s.c.n.turbine.EurekaInstanceDiscovery [0;39m [2m:[0;39m Fetching instances for app: customer
[2m2018-05-14 23:30:36.379[0;39m [32m INFO[0;39m [35m10622[0;39m [2m---[0;39m [2m[        Timer-0][0;39m [36mo.s.c.n.turbine.EurekaInstanceDiscovery [0;39m [2m:[0;39m Received instance list for app: customer, size=1
[2m2018-05-14 23:30:36.379[0;39m [32m INFO[0;39m [35m10622[0;39m [2m---[0;39m [2m[        Timer-0][0;39m [36mc.n.t.discovery.InstanceObservable      [0;39m [2m:[0;39m Retrieved hosts from InstanceDiscovery: 2
[2m2018-05-14 23:30:36.379[0;39m [32m INFO[0;39m [35m10622[0;39m [2m---[0;39m [2m[        Timer-0][0;39m [36mc.n.t.discovery.InstanceObservable      [0;39m [2m:[0;39m Found hosts that have been previously terminated: 0

具体引用文章参考:https://www.cnblogs.com/chenweida/p/9025589.html

阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页