首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Hystrix仪表板

Hystrix仪表板
EN

Stack Overflow用户
提问于 2017-11-25 07:40:33
回答 0查看 703关注 0票数 0

我对Hystrix完全陌生,但是我需要从它来监控指标。

到目前为止,我得到了一个独立的显示/运行Hystrix仪表板的工具。

在我的项目中我添加了依赖项;

代码语言:javascript
复制
compile(group:"com.netflix.hystrix", name:"hystrix-metrics-event-stream", version:'1.5.5')
compile(group:"org.springframework.cloud", name:"spring-cloud-starter-hystrix-dashboard", version:'1.1.5.RELEASE')
compile(group:"org.springframework.boot", name:"spring-boot-starter-actuator", version:'1.4.0.RELEASE')
compile(group:"org.springframework.cloud", name:"spring-cloud-starter-hystrix", version:'1.1.5.RELEASE')

同样在我的SpringConfig中,我添加了

代码语言:javascript
复制
@EnableHystrix
public class MyAppConfig {

    @Bean
    public ServletRegistrationBean servletRegistration() {
        ServletRegistrationBean registration = new ServletRegistrationBean(new HystrixMetricsStreamServlet(), "/hystrix.stream"); 
        return registration;
    }
}

我成功地引导了可以通过localhost:8080/health检查它是否正在运行的服务,并得到了答案。

当我添加localhost:8080/hystrix.stream并点击Hystrix仪表板中的Monitor Streams按钮时,它会显示“正在加载...”但随后我得到“无法连接到命令度量流”。

另外,我在仪表板控制台中得到了这个;

代码语言:javascript
复制
17:19:26.858 [vert.x-eventloop-thread-0] INFO  c.g.k.h.c.s.d.HystrixDashboardProxyConnectionHandler - Proxing request to http://localhost:8080/hystrix.stream
17:19:31.879 [vert.x-eventloop-thread-0] ERROR c.g.k.h.c.s.d.HystrixDashboardProxyConnectionHandler - Proxying request
java.util.concurrent.TimeoutException: The timeout period of 5000ms has been exceeded
        at io.vertx.core.http.impl.HttpClientRequestBase.timeout(HttpClientRequestBase.java:155)
        at io.vertx.core.http.impl.HttpClientRequestBase.handleTimeout(HttpClientRequestBase.java:140)
        at io.vertx.core.http.impl.HttpClientRequestBase.lambda$setTimeout$0(HttpClientRequestBase.java:100)
        at io.vertx.core.impl.VertxImpl$InternalTimerHandler.handle(VertxImpl.java:782)
        at io.vertx.core.impl.VertxImpl$InternalTimerHandler.handle(VertxImpl.java:753)
        at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:316)
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:418)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:440)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
        at java.lang.Thread.run(Thread.java:745)
17:19:31.894 [vert.x-eventloop-thread-0] ERROR c.g.k.h.c.s.d.HystrixDashboardProxyConnectionHandler - Proxying request
io.vertx.core.VertxException: Connection was closed
        at io.vertx.core.http.impl.ClientConnection.handleClosed(ClientConnection.java:396)
        at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:314)
        at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:190)
        at io.vertx.core.net.impl.VertxHandler.channelInactive(VertxHandler.java:97)

最后,尝试创建curl localhost:8080/hystrix.stream完全没有响应。

我不确定是不是漏掉了什么,有人能给我提示吗?

致以问候。

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47481273

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档