SpringCloud
SpringCloud copied to clipboard
feign.RetryableException: Read timed out executing GET 是什么原因?
问题描述
前端项目登陆的时候,报错500。
原因分析
是因为feign获取user的时候,超时,然后走的是降级的代码。
本质就是因为feign请求的时候,超时。
在这个项目里,feign请求超时。
而且,自己写的简单demo ( https://gitee.com/52itstyle/Spring-Cloud-Alibaba.git ), 专门用于测试nacos和feign,也是超时。一模一样的错误。
所以,应该不是这个项目的原因,而是我的电脑(mac),只要是nacos和feign,都是超时。
2020-02-24 20:58:21.938 ERROR [authorization-server,b6ed6d23d9efe8e5,b6ed6d23d9efe8e5,true] 20465 --- [nio-8000-exec-1] .a.p.OrganizationProviderFallbackFactory : Read timed out executing GET http://organization/user?uniqueId=admin
feign.RetryableException: Read timed out executing GET http://organization/user?uniqueId=admin
也不是超时时间设置太短的原因,因为设置更大的值的时候,仍然报错。
超时时间调长之后,还是报错。
2020-02-24 21:12:05.386 ERROR [authorization-server,d821df471e665a63,d821df471e665a63,true] 22044 --- [nio-8000-exec-2] .a.p.OrganizationProviderFallbackFactory : Unexpected end of file from server executing GET http://organization/user?uniqueId=admin
feign.RetryableException: Unexpected end of file from server executing GET http://organization/user?uniqueId=admin
换了一个http客户端(通过spring cloud common中的负载均衡接口选取服务提供节点实现接口调用),不使用feign,还是报一样的错误。
java.net.SocketException: Unexpected end of file from server
两边feign版本要一致,不知道你这边是不是这个原因,我之前开发时候踩过这个坑
两边feign版本要一致,不知道你这边是不是这个原因,我之前开发时候踩过这个坑
谢谢,不是这个原因哦。
nacos有问题,有人提了bug:https://github.com/alibaba/nacos/issues/2099 。但是,下载了最新版本(1.2.0-beta.1(Feb 18th, 2020)),还是一样的问题!
有人说是公司内网原因:https://github.com/alibaba/spring-cloud-alibaba/issues/1072 。但是,我是本机测试,有这个问题,和网络没什么原因吧。
有人说是公司内网原因:alibaba/spring-cloud-alibaba#1072 。但是,我是本机测试,有这个问题,和网络没什么原因吧。
是因为organization服务启动后,第一次请求响应太慢了,我试了下,每次启动后,第一次请求都要响应十多秒左右,第二次请求开始就正常返回
请问这个问题解决了吗?我也出现了相同的问题
看下电脑网络,或者有没有开WIFI共享之类的
我的甚至不说是read timeout还是connect timeout 时间调了60s postman4s就报错了
@diedai 请问最后是如何解决? 遇到类似问题 feign.RetryableException: Unexpected end of file from server executing PUT http://xxxx.com
大家注意了,这种情况大多都是自己电脑网络的问题,比如你开全局代理什么的,feign 就会有问题了。 给大家提个醒
收到!
我碰到这个问题,我的原因是开了vpn,关掉后正常了
收到!