SpringCloud Eureka项目启动子项目报错Connection refused: connect Cannot execute request on any known server

来源:互联网 发布:什么是圆方软件 编辑:程序博客网 时间:2024/06/05 06:10

SpringCloud Eureka项目启动子项目报错Connection refused: connect Cannot execute request on any known server

问题
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:   client:     serviceUrl:       defaultZone: http://127.0.0.1:8090/eureka/

defaultZone 配置是否和服务中心eureka一致

eureka

“`
server:
port: 8099
eureka:
instance:
hostname: localhost
client:
registerWithEureka: false
fetchRegistry: false
serviceUrl:
defaultZone: http://eureka.instance.hostname:{server.port}/eureka/
server:
renewalPercentThreshold: 0.49


项目截图

阅读全文
0 0