我正在尝试使用Hystrix实现服务代理来实现断路器模式。我确实实现了Hystrix命令,并打包了Hystrix servlet以提供Hystrix流。为了监控服务,我使用的是Hystrix Dashboard 1.5.0。一切都在本地Tomcat服务器上正常工作。我能够看到指标图表
但是,当我在Bluemix上部署相同内容时,仪表板不会显示图表。相反,它说'无法连接到Command Metric Stream。'。我还使用Chrome浏览器检查了流。我能够看到如下消息:
ping:
data:
{
"type":"HystrixCommand",
"name":"GetAllContactsCommand",
"group":"GetAllContactsService",
"currentTime":1464714539673,
"isCircuitBreakerOpen":false,
"errorPercentage":0,
"errorCount":0,
"requestCount":0,
"rollingCountBadRequests":0,
"rollingCountCollapsedRequests":0,
"rollingCountEmit":0,
"rollingCountExceptionsThrown":0,
"rollingCountFailure":0,
"rollingCountEmit":0,
"rollingCountFallbackFailure":0,
"rollingCountFallbackRejection":0,
"rollingCountFallbackSuccess":0,
"rollingCountResponsesFromCache":0,
"rollingCountSemaphoreRejected":0,
"rollingCountShortCircuited":0,
"rollingCountSuccess":0,
"rollingCountThreadPoolRejected":0,
"rollingCountTimeout":0,
"currentConcurrentExecutionCount":0,
"rollingMaxConcurrentExecutionCount":0,
"latencyExecute_mean":0,
"latencyExecute":{"0":0,
"25":0,
"50":0,
"75":0,
"90":0,
"95":0,
"99":0,
"99.5":0,
"100":0
},
"latencyTotal_mean":0,
"latencyTotal":
{ "0":0,
"25":0,
"50":0,
"75":0,
"90":0,
"95":0,
"99":0,
"99.5":0,
"100":0
},
"propertyValue_circuitBreakerRequestVolumeThreshold":20,
"propertyValue_circuitBreakerSleepWindowInMilliseconds":5000,
"propertyValue_circuitBreakerErrorThresholdPercentage":50,
"propertyValue_circuitBreakerForceOpen":false,
"propertyValue_circuitBreakerForceClosed":false,
"propertyValue_circuitBreakerEnabled":true,
"propertyValue_executionIsolationStrategy":"THREAD",
"propertyValue_executionIsolationThreadTimeoutInMilliseconds":1000,
"propertyValue_executionTimeoutInMilliseconds":1000,
"propertyValue_executionIsolationThreadInterruptOnTimeout":true,
"propertyValue_executionIsolationThreadPoolKeyOverride":null,
"propertyValue_executionIsolationSemaphoreMaxConcurrentRequests":10,
"propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests":10,
"propertyValue_metricsRollingStatisticalWindowInMilliseconds":10000,
"propertyValue_requestCacheEnabled":true,
"propertyValue_requestLogEnabled":true,
"reportingHosts":1
}
data:
{
"type":"HystrixThreadPool",
"name":"GetAllContactsService",
"currentTime":1464714539673,
"currentActiveCount":0,
"currentCompletedTaskCount":3,
"currentCorePoolSize":10,
"currentLargestPoolSize":3,
"currentMaximumPoolSize":10,
"currentPoolSize":3,
"currentQueueSize":0,
"currentTaskCount":3,
"rollingCountThreadsExecuted":0,
"rollingMaxActiveThreads":0,
"rollingCountCommandRejections":0,
"propertyValue_queueSizeRejectionThreshold":5,
"propertyValue_metricsRollingStatisticalWindowInMilliseconds":10000,
"reportingHosts":1
}
任何想法,为什么Dashboard在Bluemix上部署时无法连接到流。任何帮助表示赞赏。
此致 Umasuthan。
答案 0 :(得分:0)
我尝试在Bluemix上运行时遇到了同样的问题。我也使用Spring Tools Suite在本地运行良好。是否有解决这个问题的方法?
我的情况: 我使用Spring Initialzr创建了一个Spring Cloud应用程序(Eureka,Hystrix,REST控制器)。我已将其部署到Bluemix(Cloud Foundry)。除了Hystrix仪表板,一切正常。我得到“无法连接到Command Metric Stream”。在仪表板上。
我可以卷曲流网址 - 这需要很长时间,但数据确实会回来。