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://
server:
renewalPercentThreshold: 0.49