`
郑云飞
  • 浏览: 817293 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

调用feign请求超时 feign.RetryableException: Read timed out executing

 
阅读更多

springClould项目遇到的问题

feign.RetryableException: Read timed out executing POST http://xxx

    at feign.FeignException.errorExecuting(FeignException.java:67)

    at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:104)

    at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76)

    at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)

    at com.sun.proxy.$Proxy208.queryListForQuickEntry(Unknown Source)

    at com.jzy.hio.oa.sys.quick.controller.EntryController.queryPortalList(EntryController.java:188)

    at sun.reflect.GeneratedMethodAccessor502.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)

    at java.lang.reflect.Method.invoke(Method.java:498)

    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)

    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)

    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114)

    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)

    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)

    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)

    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 com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)

    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.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:208)

    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)

    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)

    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.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:164)

    at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80)

    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.core.StandardContextValve.invoke(StandardContextValve.java)

    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: java.net.SocketTimeoutException: Read timed out

    at java.net.SocketInputStream.socketRead0(SocketInputStream.java)

    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 java.io.BufferedInputStream.fill(BufferedInputStream.java:246)

    at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)

    at java.io.BufferedInputStream.read(BufferedInputStream.java:345)

    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:735)

    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)

    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1587)

    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)

    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)

    at feign.Client$Default.convertResponse(Client.java:152)

    at feign.Client$Default.execute(Client.java:74)

    at org.springframework.cloud.sleuth.instrument.web.client.feign.TraceFeignClient.execute(TraceFeignClient.java:90)

    at org.springframework.cloud.netflix.feign.ribbon.RetryableFeignLoadBalancer$1.doWithRetry(RetryableFeignLoadBalancer.java:91)

    at org.springframework.cloud.netflix.feign.ribbon.RetryableFeignLoadBalancer$1.doWithRetry(RetryableFeignLoadBalancer.java:76)

    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.feign.ribbon.RetryableFeignLoadBalancer.execute(RetryableFeignLoadBalancer.java:76)

    at org.springframework.cloud.netflix.feign.ribbon.RetryableFeignLoadBalancer.execute(RetryableFeignLoadBalancer.java:47)

    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.Observable.unsafeSubscribe(Observable.java:10211)

    at rx.internal.operators.OperatorRetryWithPredicate$SourceSubscriber$1.call(OperatorRetryWithPredicate.java:127)

    at rx.internal.schedulers.TrampolineScheduler$InnerCurrentThreadScheduler.enqueue(TrampolineScheduler.java:73)

    at rx.internal.schedulers.TrampolineScheduler$InnerCurrentThreadScheduler.schedule(TrampolineScheduler.java:52)

    at rx.internal.operators.OperatorRetryWithPredicate$SourceSubscriber.onNext(OperatorRetryWithPredicate.java:79)

    at rx.internal.operators.OperatorRetryWithPredicate$SourceSubscriber.onNext(OperatorRetryWithPredicate.java:45)

    at rx.internal.util.ScalarSynchronousObservable$WeakSingleProducer.request(ScalarSynchronousObservable.java:276)

    at rx.Subscriber.setProducer(Subscriber.java:209)

    at rx.internal.util.ScalarSynchronousObservable$JustOnSubscribe.call(ScalarSynchronousObservable.java:138)

    at rx.internal.util.ScalarSynchronousObservable$JustOnSubscribe.call(ScalarSynchronousObservable.java:129)

    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.subscribe(Observable.java:10307)

    at rx.Observable.subscribe(Observable.java:10274)

    at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:445)

    at rx.observables.BlockingObservable.single(BlockingObservable.java:342)

    at com.netflix.client.AbstractLoadBalancerAwareClient.executeWithLoadBalancer(AbstractLoadBalancerAwareClient.java:102)

    at org.springframework.cloud.netflix.feign.ribbon.LoadBalancerFeignClient.execute(LoadBalancerFeignClient.java:63)

    at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:97)

    ... 86 more

 

解决办法

ribbon:  
  ReadTimeout: 60000  
  ConnectTimeout: 60000

 

分享到:
评论

相关推荐

    feign-core-11.8-API文档-中文版.zip

    赠送jar包:feign-core-11.8.jar; 赠送原API文档:feign-core-11.8-javadoc.jar; 赠送源代码:feign-core-11.8-sources.jar; 赠送Maven依赖信息文件:feign-core-11.8.pom; 包含翻译后的API文档:feign-core-...

    feign-form-3.8.0-API文档-中文版.zip

    赠送jar包:feign-form-3.8.0.jar; 赠送原API文档:feign-form-3.8.0-javadoc.jar; 赠送源代码:feign-form-3.8.0-sources.jar; 赠送Maven依赖信息文件:feign-form-3.8.0.pom; 包含翻译后的API文档:feign-form...

    实用负载均衡技术:网站性能优化攻略.((英)Peter Membrey

    实用负载均衡技术:网站性能优化攻略.((英)Peter Membrey

    feign-core-11.8-API文档-中英对照版.zip

    赠送jar包:feign-core-11.8.jar; 赠送原API文档:feign-core-11.8-javadoc.jar; 赠送源代码:feign-core-11.8-sources.jar; 赠送Maven依赖信息文件:feign-core-11.8.pom; 包含翻译后的API文档:feign-core-...

    java.security.cert.CertificateException: No subject alternative DNS name matching XXX found解决方案

    // 继续请求处理... ``` 然而,这种方法虽然可以解决问题,但存在严重的安全隐患。它使你的应用程序变得极其脆弱,容易受到中间人攻击,因为任何不受信任的证书都会被接受。因此,理想的做法是与第三方服务商协调...

    srping-cloud-alibaba-nacos-feign.zip

    Spring Cloud Alibaba提供了丰富的组件,其中包括Nacos作为服务注册与配置中心,以及Feign作为声明式服务调用工具。本文将深入探讨如何在Spring Cloud Alibaba框架下整合Nacos和Feign,实现高效、便捷的服务治理。 ...

    feign-core-10.12-API文档-中文版.zip

    赠送jar包:feign-core-10.12.jar; 赠送原API文档:feign-core-10.12-javadoc.jar; 赠送源代码:feign-core-10.12-sources.jar; 赠送Maven依赖信息文件:feign-core-10.12.pom; 包含翻译后的API文档:feign-core...

    venus-cloud-feign-1.5.x.rar_cloud_feign_formery87_spring

    public void configure(Feign.Builder builder) { builder.logger(new Slf4jLogger()); // 其他配置... } } ``` 五、总结 venus-cloud-feign-1.5.x是对Spring Cloud Feign的有益补充,它提高了开发者在构建...

    Spring-cloud Feign 的深入理解

    Spring Cloud Feign 深入理解 Spring Cloud Feign 是一个基于 Netflix 的 Feign 实现,提供了一个声明式的 REST 客户端。它可以帮助开发者快速构建 RESTful 风格的微服务接口。 Feign 的调用流程 Feign 的调用...

    spring-cloud.pdf

    HystrixTimeoutsAndRibbonClients: Hystrix与Ribbon结合,实现服务调用的超时处理。 7.7. ClientSideLoadBalancer:Ribbon: 客户端负载均衡的实现。 7.8. ExternalConfiguration:Archaius: 外部化配置的集成,如...

    feign-form-3.8.0-API文档-中英对照版.zip

    赠送jar包:feign-form-3.8.0.jar; 赠送原API文档:feign-form-3.8.0-javadoc.jar; 赠送源代码:feign-form-3.8.0-sources.jar; 赠送Maven依赖信息文件:feign-form-3.8.0.pom; 包含翻译后的API文档:feign-form...

    feign-form-spring-3.8.0-API文档-中文版.zip

    赠送jar包:feign-form-spring-3.8.0.jar; 赠送原API文档:feign-form-spring-3.8.0-javadoc.jar; 赠送源代码:feign-form-spring-3.8.0-sources.jar; 赠送Maven依赖信息文件:feign-form-spring-3.8.0.pom; ...

    SpringBoot使用Feign调用第三方接口Demo.zip

    这可以通过自定义配置类并指定`feign.codec.Decode`实现: ```java @Configuration public class FeignConfiguration { @Bean public Decoder feignDecoder() { return new JacksonDecoder(); } } ``` 以上...

    Feign调用丢失Header的解决方案.docx

    Feign默认情况下不会自动传递所有请求头(Header),这可能导致某些依赖于特定Header信息的服务调用失败或行为异常。例如,认证信息、跟踪ID等关键Header如果未能正确传递,则可能引起一系列问题,如权限验证失败、...

    feign调用session丢失解决方案.txt

    feign调用session丢失解决方案, Hystrix传播ThreadLocal对象; 自定义熔断策略

    maven-resources-production java.lang.NegativeArraySizeException

    maven-resources-production java.lang.NegativeArraySizeException java.lang.NegativeArraySizeException 问题解决

    在SpringCloud 使用Security+Oauth2 时候再去使用fegin,发现出现401未授权

    我们在使用spring cloud时如果设置了oauth2授权模式,那么应用服务A再调用服务B时使用Feign请求会出现401授权认证的问题,那么解决办法就是在feign调用请求时获取到assessToken并设置到请求header中就可以解决这个...

    Spring Cloud Feign报错问题解决

    feign.hystrix.enabled=true ``` 此外,还需要在启动类中添加@EnableFeignClients注解,以启用Feign的自动配置。 在实际开发中,可能还会遇到其他的一些报错问题,例如feign接口中的方法签名不正确、熔断方法的...

    springcloud-eureka-feign-mybatis-seata.zip

    总之,"springcloud-eureka-feign-mybatis-seata.zip"这个项目提供了一个完整的微服务架构下分布式事务处理的实例,通过Eureka的注册发现、Feign的声明式调用、MyBatis的ORM操作以及Seata的分布式事务管理,展示了...

    第五章 SpringCloud 使用Feign调用服务.pdf

    import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestMapping; import org.spring...

Global site tag (gtag.js) - Google Analytics