首页 > Web开发 > 详细

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

时间:2020-09-07 08:48:59      阅读:83      评论:0      收藏:0      [点我收藏+]

昨天学springcloud,然后出了这么一个异常,

最后发现是只配置了Eureka的service的application.yml文件,但是我把Eureka的client的application文件给忘了。

最后如下:service

server:
  port: 7001
eureka:
  instance:
    hostname: localhost
  client:
    register-with-eureka: false
    fetch-registry: false
    service-url:
      defaultZone:  http://${eureka.instance.hostname}:${server.port}/eureka/

client

eureka:
  client:
    register-with-eureka: true
    fetch-registry: true
    service-url:
      defaultZone: http://localhost:7001/eureka/

 

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

原文:https://www.cnblogs.com/woyujiezhen/p/13624702.html

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