ZuulException:转发错误,引起:java.net.SocketException:管道损坏

时间:2016-04-07 17:45:41

标签: spring-boot netflix-eureka netflix-zuul spring-cloud-netflix

由于我的Integeration测试环境中的管道问题,我面临以下ZuulException异常。只部署了一个服务,但仍然得到以下异常,理想情况下它应该始终可用。 这个问题是间歇性的,有时它正在工作,有时它不是。有没有人遇到过这个问题,是否还有其他配置要做?

LOG TRACE

com.netflix.zuul.exception.ZuulException: Forwarding error
                at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.forward(RibbonRoutingFilter.java:145) ~[spring-cloud-netflix-core-1.0.0.RELEASE.jar!/:1.0.0.RELEASE]
                at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.run(RibbonRoutingFilter.java:110) ~[spring-cloud-netflix-core-1.0.0.RELEASE.jar!/:1.0.0.RELEASE]
                at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:112) ~[zuul-core-1.0.28.jar!/:na]
                at com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:197) ~[zuul-core-1.0.28.jar!/:na]
                at com.netflix.zuul.FilterProcessor.runFilters(FilterProcessor.java:161) ~[zuul-core-1.0.28.jar!/:na]
                at com.netflix.zuul.FilterProcessor.route(FilterProcessor.java:120) ~[zuul-core-1.0.28.jar!/:na]
                at com.netflix.zuul.ZuulRunner.route(ZuulRunner.java:84) ~[zuul-core-1.0.28.jar!/:na]

Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: userManagementRibbonCommand 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: com.netflix.client.ClientException: null
                at com.netflix.client.AbstractLoadBalancerAwareClient.executeWithLoadBalancer(AbstractLoadBalancerAwareClient.java:123) ~[ribbon-loadbalancer-2.0-RC13.jar!/:na]
                at com.netflix.client.AbstractLoadBalancerAwareClient.executeWithLoadBalancer(AbstractLoadBalancerAwareClient.java:81) ~[ribbon-loadbalancer-2.0-RC13.jar!/:na]

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]

1 个答案:

答案 0 :(得分:1)

不确定这是否可以解决您的问题,但如果您已经没有问题,请将其添加到您的application.yml文件中

   hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 60000

    ribbon: 
     ConnectTimeout: 3000
     ReadTimeout: 60000