feign.RetryableException: connect timed out executing xxxxxx
Spring Cloud 使用 OpenFeign 报错
connect timed out executing GET http://CLOUD-PAYMENT-SERVICE/payment/feign/timeout
feign.RetryableException: connect timed out executing GET http://CLOUD-PAYMENT-SERVICE/payment/feign/timeout at feign.FeignException.errorExecuting(FeignException.java:213) at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:115) at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:80) at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103) at com.sun.proxy.$Proxy158.paymentFeignTimout(Unknown Source) at com.cup.springcloud.controller.OrderFeignController.paymentFeignTimout(OrderFeignController.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
......
错误原因
OpenFeign 调用超时,OpenFeign 底层有 Ribbon, 而 它的默认超时时间是 1 s ,如果你确定你的调用代码是正确的,那么说明是业务处理时间超过了 1 s ,这样的话只需要将超时时间设置的长一点就可以了
是在服务消费方中设置:
# 设置 feign 客户端超时时间(OpenFeign 默认支持 ribbon)
ribbon:# 值的是建立连接所用的时间,使用与网络状态正常的情况,两端连接所用的时间ReadTimeout: 5000# 指的是建立连接后从服务器读取到可用资源所用的时间ConnectionTimeout: 5000
设置足够长的时间后,如果运行后等待了你设置的时间后又报了同样的错误,那肯定是 OpenFeign 的调用流程写的有问题,反复检查。
feign.RetryableException: connect timed out executing xxxxxx相关推荐
- feign.RetryableException: Read timed out executing POST http://......
问题描述 SpringCloud微服务之间远程调用报错超时. feign.RetryableException: Read timed out executing POST http://...... ...
- 微服务调用异常:error feign.RetryableException: Read timed out executing POST http://xxx.......
最近在将nacos server版本从1.3版本升级到1.4版本,接口服务调用基础的搜索服务时出现以上异常.因为是时而正常,时而超时,推测是注册客户端的版本过低,于是升级Nacos client版本, ...
- feign.RetryableException: Read timed out executing 异常解决办法
首先看一下报错整体: feign.RetryableException: Read timed out executing GET (你访问的地址)at feign.FeignException.er ...
- feign.RetryableException: Read timed out executing GET
一.判断是否有开启代理 之前有开启vpn加速代理,导致超时,此种情况下关闭代理即可. 二.真实接口响应较慢 调整feign超时时间配置 yaml配置: feign:client:config:defa ...
- 【springCloud】feign.RetryableException: Read timed out executing GET.。的有效解决办法
1.错误如下图 2.解决办法 错误提示是请求超时,那我们就把请求的时间改大不久行了,这也是网上的大多数朋友给的解决方案,在网关配置ribbon: ribbon:ConnectTimeout: 6000 ...
- feign.RetryableException: Read timed out executing GET http://*****
解决方法: 在项目的application.properties文件中添加如下配置: #全局配置 # 请求连接的超时时间 默认的时间为 1 秒 ribbon.ConnectTimeout=5000 # ...
- Request processing failed; nested exception is feign.RetryableException: Read timed out
前言 spring boot 2.0.0.RELEASE spring cloud Finchley.RELEASE 错误:Request processing failed; nested exce ...
- nested exception is feign.RetryableException: Incomplete output stream executing POST http://
一.背景 SpringCloud微服务框架中使用OpenFeign做服务间调用时(入参为@ResponseBody标注的JavaBean,请求类型为POST),被调用方正常执行,调用方报错,报错信息如 ...
- 解决SpringCloud之Feign超时问题(Read timed out executing POST http://***)
Question: 在调用外部接口时可能会由于延迟,造成造成Feign "Read timed out executing POST" feign.RetryableExcepti ...
最新文章
- AI校招程序员最高薪酬曝光!腾讯80万年薪领跑,还送北京户口
- python分组求和_Python学习笔记之pandas索引列、过滤、分组、求和功能示例
- lintcode_75.寻找峰值
- 专访刘伟:软件开发人员的内功修炼之道
- const与指针变量
- mapreduce分组统计_如何优雅的理解MapReduce
- 万用表判断场效应管的好坏
- [Lintcode]66. Binary Tree Preorder Traversal/[Leetcode]144. Binary Tree Preorder Traversal
- jvm 堆外内存_jvm┃java内存区域,跳槽大厂必会知识点
- Android IPC数据在内核空间中的发送过程分析
- 2018年香港访港旅客超6500万人次 创16年新高
- reactbootstrap php,什么是React-Bootstrap
- linux下fish配置终端,如何在Linux中安装、配置和使用Fish Shell?
- 网络编程练手小项目---英英词典
- 搜狐狐友与腾讯微信两款社交软件的比较
- Android应用快捷方式
- 怎么用软件测试睡眠质量差怎么办,手机软件可测睡眠质量?
- Kalman滤波在温度测量中的应用(含MATLAB仿真)
- 开关电源-半桥LLC控制
- 【数据结构 树:二叉树分类、红黑树讲解】