Cannot execute request on any known server

Posted xiaolovewei

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Cannot execute request on any known server相关的知识,希望对你有一定的参考价值。

1、com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect

或者com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server

原因如下:

在默认设置下,Eureka服务注册中心也会将自己作为客户端来尝试注册它自己,所以我们需要禁用它的客户端注册行为。

禁止方式如下:在application.properties配置文件中增加以下内容

eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
如图所示:
重新启动即可

以上是关于Cannot execute request on any known server的主要内容,如果未能解决你的问题,请参考以下文章

客户端注册Cannot execute request on any known server解决

com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known serve

fetch 报错 Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot

fetch 报错 Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot

SpringCloud问题解决:spring-cloud-eureka启动出错Cannot execute request on any known server

携程apollo源码在idea中启动报错TransportException: Cannot execute request on any known server