spring-cloud-hystrix之Unable to connect to Command Metric Stream.异常
2017-05-17 16:06
691 查看
解决方法:
1,检查是否添加以下依赖
<!--监控中心-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- hystrix 断路器-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
<!-- hystrix-dashboard监控 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
</dependency>
2,springboot启动程序是否设置@EnableHystrixDashboard、@EnableCircuitBreaker注解
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
@EnableHystrixDashboard
@EnableCircuitBreaker
public class FeignApplication {
public static void main(String[] args) {
SpringApplication.run(FeignApplication.class, args);
}
}
3,是否在服务方法上添加 @HystrixCommand配置
@HystrixCommand(fallbackMethod = "addFallBack",
threadPoolProperties = {
@HystrixProperty(name = "coreSize", value = "30"),
@HystrixProperty(name = "maxQueueSize", value = "101"),
@HystrixProperty(name = "keepAliveTimeMinutes", value = "2"),
@HystrixProperty(name = "queueSizeRejectionThreshold", value = "15"),
@HystrixProperty(name = "metrics.rollingStats.numBuckets", value = "12"),
@HystrixProperty(name = "metrics.rollingStats.timeInMilliseconds", value = "1440")
},
commandProperties = {
@HystrixProperty(name="execution.isolation.strategy", value="SEMAPHORE"),
@HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "100"),
@HystrixProperty(name = "circuitBreaker.requestVolumeThreshold", value = "50")
})
4,hystrix dashboard主页是否正确设置Monitor Stream
一般为:域名:端口/hystrix.stream
1,检查是否添加以下依赖
<!--监控中心-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- hystrix 断路器-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
<!-- hystrix-dashboard监控 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
</dependency>
2,springboot启动程序是否设置@EnableHystrixDashboard、@EnableCircuitBreaker注解
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
@EnableHystrixDashboard
@EnableCircuitBreaker
public class FeignApplication {
public static void main(String[] args) {
SpringApplication.run(FeignApplication.class, args);
}
}
3,是否在服务方法上添加 @HystrixCommand配置
@HystrixCommand(fallbackMethod = "addFallBack",
threadPoolProperties = {
@HystrixProperty(name = "coreSize", value = "30"),
@HystrixProperty(name = "maxQueueSize", value = "101"),
@HystrixProperty(name = "keepAliveTimeMinutes", value = "2"),
@HystrixProperty(name = "queueSizeRejectionThreshold", value = "15"),
@HystrixProperty(name = "metrics.rollingStats.numBuckets", value = "12"),
@HystrixProperty(name = "metrics.rollingStats.timeInMilliseconds", value = "1440")
},
commandProperties = {
@HystrixProperty(name="execution.isolation.strategy", value="SEMAPHORE"),
@HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "100"),
@HystrixProperty(name = "circuitBreaker.requestVolumeThreshold", value = "50")
})
4,hystrix dashboard主页是否正确设置Monitor Stream
一般为:域名:端口/hystrix.stream
相关文章推荐
- spring-cloud-hystrix之Unable to connect to Command Metric Stream.异常
- hystrix dashboard Unable to connect to Command Metric Stream解决办法
- Hystrix仪表盘--Unable to connect to Command Metric Stream
- Unable to connect to Command Metric Stream.解决方案
- Unable to connect to Command Metric Stream 出现的几种可能
- 异常解决篇:spring cloud stream rabbitMq配置错误,导致无法启动
- jxl读取excel文件异常:Unable to recognize OLE stream
- 【Spring Cloud】Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletCon
- 基于Spring3 MVC实现基于form表单上传Excel文件,批量导入数据时,报错:Unable to recognize OLE stream !
- 【Spring Cloud】Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletCon
- 笔记:Spring Cloud Hystrix 异常处理、缓存和请求合并
- struts2整合spring出现的Unable to instantiate Action异常
- struts整合spring插件出现如下异常:Unable to load jar:struts2-spring-plugin-2.3.15.3.jar!/struts-plugin.xml
- 【Spring Cloud】Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletCon
- 【Spring Cloud】Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletCon
- Spring Cloud Hystrix: 控制stream推送频率
- Unable to locate Spring NamespaceHandler for XML schema namespace异常解决
- Unable to locate Spring NamespaceHandler for XML schema namespace异常
- Xcode进行发包时异常(unable to execute command:Segmentation fault:11)
- Spring Cloud Hystrix: 控制stream推送频率