gpt4 book ai didi

spring-cloud - Spring Cloud : Zuul Broken Pipe Error

转载 作者:行者123 更新时间:2023-12-04 00:12:09 24 4
gpt4 key购买 nike

我正在对由 zuul 代理服务支持的简单 Spring Cloud 应用程序进行一些压力测试
由于 Zuul 和服务之间的连接陈旧,我们偶尔会出现管道损坏异常。
我用不同的配置选项配置了 Zuul,但没有成功:

hystrix:
command:
default:
execution:
isolation:
strategy: THREAD
thread:
timeoutInMilliseconds: 61000


ribbon:
ReadTimeout: 60000
ConnectTimeout: 6000

zuul:
host:
socket-timeout-millis: 60000
connect-timeout-millis: 60000

在此先感谢您提供解决此问题的任何线索。
异常(exception)情况如下:
`

com.netflix.zuul.exception.ZuulException: Forwarding error at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.forward(RibbonRoutingFilter.java:151) ~[router.jar!/:0.0.1] at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.run(RibbonRoutingFilter.java:114) ~[router.jar!/:0.0.1] at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:112) ~[zuul-core-1.0.28.jar!/:na]

Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: query-serviceRibbonCommand failed and no fallback available. at com.netflix.hystrix.AbstractCommand$20.call(AbstractCommand.java:816) ~[hystrix-core-1.4.0-RC6.jar!/:na] at com.netflix.hystrix.AbstractCommand$20.call(AbstractCommand.java:798) ~[hystrix-core-1.4.0-RC6.jar!/:na] at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$1.onError(OperatorOnErrorResumeNextViaFunction.java:77) ~[rxjava-1.0.4.jar!/:1.0.4] at rx.internal.operators.OperatorDoOnEach$1.onError(OperatorDoOnEach.java:70) ~[rxjava-1.0.4.jar!/:1.0.4]

Caused by: java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) ~[na:1.8.0_45] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109) ~[na:1.8.0_45] at java.net.SocketOutputStream.write(SocketOutputStream.java:153) ~[na:1.8.0_45] at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:159) ~[httpcore-4.3.3.jar!/:4.3.3] ... at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55) ~[rxjava-1.0.4.jar!/:1.0.4] at com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:185) ~[ribbon-loadbalancer-2.0-RC13.jar!/:na] at com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:180

最佳答案

我遇到了同样的问题:我通过将 zuul 执行超时添加到 zuul 服务器的 application.yml 来解决它:

# Increase the Hystrix timeout to 60s (globally)
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 60000

请参阅有关 netflix 问题的此线程: https://github.com/spring-cloud/spring-cloud-netflix/issues/321

关于spring-cloud - Spring Cloud : Zuul Broken Pipe Error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33109371/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com