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

昨天学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

上一篇:svn 锁的处理


下一篇:.Net Core使用IdentityServer4(未完待续)