Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hystrix dashbord 后台报错 Error proxying request: http://localhost:8762/actuator/hystrix.stream?delay=2000 java.net.SocketTimeoutException: Read timed out #49

Open
aijingaiyi opened this issue Sep 26, 2019 · 1 comment

Comments

@aijingaiyi
Copy link

sfc-chapter-12 工程运行,hystrix dashborad出现错误Unable to connect to Command Metric Stream,hystrix dashboard请求路径为:http://localhost:8762/actuator/hystrix.stream,

前台报错如下:

EventSource's response has a MIME type ("text/plain") that is not "text/event-stream". Aborting the connection.

后台错误如下:

Proxy opening connection to: http://localhost:8762/actuator/hystrix.stream?delay=2000
2019-09-26 11:31:23.536 ERROR 135936 --- [nio-8762-exec-2] ashboardConfiguration$ProxyStreamServlet : Error proxying request: http://localhost:8762/actuator/hystrix.stream?delay=2000
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0_181]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[na:1.8.0_181]

浏览器直接请求:http://localhost:8762/actuator/hystrix.stream正常返回结果:

data: {"type":"HystrixCommand","name":"home","group":"ServiceHiApplication$$EnhancerBySpringCGLIB$$541db1ca","currentTime":1569468427754,"isCircuitBreakerOpen":false,"errorPercentage":0,"errorCount":0,"requestCount":0,"rollingCountBadRequests":0,"rollingCountCollapsedRequests":0,"rollingCountEmit":0,"rollingCountExceptionsThrown":0,"rollingCountFailure":0,"rollingCountFallbackEmit":0,"rollingCountFallbackFailure":0,"rollingCountFallbackMissing":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,"threadPool":"ServiceHiApplication$$EnhancerBySpringCGLIB$$541db1ca"}
请问怎么解决这个问题

@aijingaiyi
Copy link
Author

放在linux上面跑就可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant