[[錯誤現象:]]
界面沒有監控信息,只有一行字:unable to connect to command metric stream ,如下圖:
[[可能原因]]:
1)stream地址輸入錯誤,一定要輸入:ip:port/turbine.stream,可能會誤寫成:ip:port/turbine.stream,這樣一來,反復檢查都不容易檢查出問題,因為本身后者在使用hystrix時是沒錯的,但用turbine時就不對了;
2)缺少pom依賴或注解
依賴項如下:
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-turbine</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
注解如下:
@SpringBootApplication @EnableHystrixDashboard @EnableTurbine
public class EurekaMonitorClientApplication {
public static void main(String[] args) {
SpringApplication.run(EurekaMonitorClientApplication.class, args);
}
}