首页 > 编程语言 > 详细

SpringCloud报错:com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server

时间:2018-09-24 23:04:38      阅读:238      评论:0      收藏:0      [点我收藏+]

启动SpringCloudEureka 报错:
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server

解决方法:

先仔细检查,指定的注册中心 eureka.client.serviceUrl.defaultZone的地址是否正确,端口号有没有写错。
然后,在application.yml 添加以下配置:

#Eureka服务注册中心也会将自己作为客户端来尝试注册它自己,所以我们需要禁用它的客户端注册行为。
eureka:
  client:
    registerWithEureka: false   
    fetchRegistry: false

 

另外,如果是properties文件配置,则如下所示:

eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false

 

SpringCloud报错:com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server

原文:https://www.cnblogs.com/expiator/p/9696887.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!