com netflix zuul exception ZuulException Forwarding error

                       

解决办法

hystrix:  command:    default:      execution:        isolation:          thread:            timeoutInMilliseconds: 60000 ribbon:    ReadTimeout: 60000    ConnectTimeout: 60000  zuul:  host:     connect-timeout-millis: 10000    socket-timeout-millis: 60000
    
    
    
    
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17

根据情况, 有可能是ribbon的问题,也可能不需要设置 ribbon

2018-01-30 10:27:43.315 WARN  [http-nio-9999-exec-1] [hio-gateway] o.s.c.n.z.f.post.SendErrorFilter - Error during filteringcom.netflix.zuul.exception.ZuulException: Forwarding error    at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.handleException(RibbonRoutingFilter.java:170)    at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.forward(RibbonRoutingFilter.java:145)    at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.run(RibbonRoutingFilter.java:88)    at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:112)    at com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:193)    at com.netflix.zuul.FilterProcessor.runFilters(FilterProcessor.java:157)    at com.netflix.zuul.FilterProcessor.route(FilterProcessor.java:118)    at com.netflix.zuul.ZuulRunner.route(ZuulRunner.java:96)    at com.netflix.zuul.http.ZuulServlet.route(ZuulServlet.java:116)    at com.netflix.zuul.http.ZuulServlet.service(ZuulServlet.java:81)    at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:157)    at org.springframework.cloud.netflix.zuul.web.ZuulController.handleRequest(ZuulController.java:44)    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)    at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)    at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:105)    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:89)    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)    at org.springframework.cloud.sleuth.instrument.web.TraceFilter.doFilter(TraceFilter.java:150)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)    at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:107)    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:784)    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)    at java.lang.Thread.run(Thread.java:748)Caused by: com.netflix.client.ClientException: null    at com.netflix.client.AbstractLoadBalancerAwareClient.executeWithLoadBalancer(AbstractLoadBalancerAwareClient.java:123)    at com.netflix.client.AbstractLoadBalancerAwareClient.executeWithLoadBalancer(AbstractLoadBalancerAwareClient.java:81)    at org.springframework.cloud.netflix.zuul.filters.route.support.AbstractRibbonCommand.run(AbstractRibbonCommand.java:96)    at org.springframework.cloud.netflix.zuul.filters.route.support.AbstractRibbonCommand.run(AbstractRibbonCommand.java:42)    at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:301)    at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:297)    at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:46)    at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)    at rx.Observable.unsafeSubscribe(Observable.java:10211)    at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51)    at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)    at rx.Observable.unsafeSubscribe(Observable.java:10211)    at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)    at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)    at rx.Observable.unsafeSubscribe(Observable.java:10211)    at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)    at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)    at rx.Observable.unsafeSubscribe(Observable.java:10211)    at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)    at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)    at rx.Observable.unsafeSubscribe(Observable.java:10211)    at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)    at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)    at rx.Observable.unsafeSubscribe(Observable.java:10211)    at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)    at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)    at rx.Observable.unsafeSubscribe(Observable.java:10211)    at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51)    at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)    at rx.Observable.unsafeSubscribe(Observable.java:10211)    at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)    at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)    at rx.Observable.unsafeSubscribe(Observable.java:10211)    at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)    at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)    at rx.Observable.unsafeSubscribe(Observable.java:10211)    at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)    at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)    at rx.Observable.unsafeSubscribe(Observable.java:10211)    at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51)    at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)    at rx.Observable.subscribe(Observable.java:10307)    at rx.Observable.subscribe(Observable.java:10274)    at rx.internal.operators.BlockingOperatorToFuture.toFuture(BlockingOperatorToFuture.java:51)    at rx.observables.BlockingObservable.toFuture(BlockingObservable.java:412)    at com.netflix.hystrix.HystrixCommand.queue(HystrixCommand.java:377)    at com.netflix.hystrix.HystrixCommand.execute(HystrixCommand.java:343)    at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.forward(RibbonRoutingFilter.java:139)    ... 74 common frames omittedCaused by: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out    at rx.exceptions.Exceptions.propagate(Exceptions.java:58)    at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:465)    at rx.observables.BlockingObservable.single(BlockingObservable.java:342)    at com.netflix.client.AbstractLoadBalancerAwareClient.executeWithLoadBalancer(AbstractLoadBalancerAwareClient.java:102)    ... 137 common frames omittedCaused by: java.net.SocketTimeoutException: Read timed out    at java.net.SocketInputStream.socketRead0(Native Method)    at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)    at java.net.SocketInputStream.read(SocketInputStream.java:171)    at java.net.SocketInputStream.read(SocketInputStream.java:141)    at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)    at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)    at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:282)    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)    at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)    at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)    at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)    at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)    at org.springframework.cloud.netflix.ribbon.apache.RetryableRibbonLoadBalancingHttpClient$1.doWithRetry(RetryableRibbonLoadBalancingHttpClient.java:94)    at org.springframework.cloud.netflix.ribbon.apache.RetryableRibbonLoadBalancingHttpClient$1.doWithRetry(RetryableRibbonLoadBalancingHttpClient.java:72)    at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:276)    at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:157)    at org.springframework.cloud.netflix.ribbon.apache.RetryableRibbonLoadBalancingHttpClient.executeWithRetry(RetryableRibbonLoadBalancingHttpClient.java:107)    at org.springframework.cloud.netflix.ribbon.apache.RetryableRibbonLoadBalancingHttpClient.execute(RetryableRibbonLoadBalancingHttpClient.java:72)    at org.springframework.cloud.netflix.ribbon.apache.RetryableRibbonLoadBalancingHttpClient.execute(RetryableRibbonLoadBalancingHttpClient.java:52)    at com.netflix.client.AbstractLoadBalancerAwareClient$1.call(AbstractLoadBalancerAwareClient.java:109)    at com.netflix.loadbalancer.reactive.LoadBalancerCommand$3$1.call(LoadBalancerCommand.java:303)    at com.netflix.loadbalancer.reactive.LoadBalancerCommand$3$1.call(LoadBalancerCommand.java:287)    at rx.internal.util.ScalarSynchronousObservable$3.call(ScalarSynchronousObservable.java:231)    at rx.internal.util.ScalarSynchronousObservable$3.call(ScalarSynchronousObservable.java:228)    at rx.Observable.unsafeSubscribe(Observable.java:10211)    at rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.drain(OnSubscribeConcatMap.java:286)    at rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.onNext(OnSubscribeConcatMap.java:144)    at com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:185)    at com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:180)    at rx.Observable.unsafeSubscribe(Observable.java:10211)    at rx.internal.operators.OnSubscribeConcatMap.call(OnSubscribeConcatMap.java:94)    at rx.internal.operators.OnSubscribeConcatMap.call(OnSubscribeConcatMap.java:42)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)    at rx.Observable.subscribe(Observable.java:10307)    at rx.Observable.subscribe(Observable.java:10274)    at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:445)    ... 139 common frames omitted
    
    
    
    
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
           

再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow

你可能感兴趣的:(com netflix zuul exception ZuulException Forwarding error)