spring cloud 使用之坑 Request processing failed; nested exception is feign.RetryableException:

    今天使用spring cloud访问其他人暴露的接口,莫名其妙的出现 一次请求成功 一次请求失败的问题,上网找了各种资料,都说是spring cloud zookeper注册的问题,可是我的工程根本没有应用zookper ,这个就尴尬了。


2018-06-08 14:42:20.278 ERROR 3108 --- [nio-8888-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is feign.RetryableException: cannot retry due to redirection, in streaming mode executing POST [图片]http://ucenter/register] with root cause

[图片]java.net.HttpRetryException: cannot retry due to redirection, in streaming mode
	at [图片]sun.net.[图片]www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2637) ~[na:1.8.0_144]
	at [图片]sun.net.[图片]www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2623) ~[na:1.8.0_144]
	at [图片]sun.net.[图片]www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1806) ~[na:1.8.0_144]
	at [图片]sun.net.[图片]www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474) ~[na:1.8.0_144]

我的代码如下:




大家不用质疑 我这个接口 我是maven父子工程,接口统一放到common工程里,调用接口的为另外一个子工程。


本次错误主要问题:

注册中心, 有人 同样的工程 不同的端口号 启用了两次服务,导致出现了暴露的接口 出现了同名的情况,并且关闭了其中一个工程, 导致访问的时候出现一次生效,一次失效的问题!!!!!!!

主要解决办法:

 关闭一个相同的工程,实在不行就重启注册中心

猜你喜欢

转载自blog.csdn.net/qq_27101653/article/details/80623929