报错内容:
2021-07-30 14:10:29.555 [DiscoveryClient-InstanceInfoReplicator-0] ERROR com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient - Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://xx.xx.xx.x:8660/eureka/}
com.sun.jersey.api.client.ClientHandlerException: Connection refused: connect
2021-07-30 14:10:29.555 [DiscoveryClient-InstanceInfoReplicator-0] WARN com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient - Request execution failed with message: java.net.ConnectException: Connection refused: connect
2021-07-30 14:10:29.556 [DiscoveryClient-InstanceInfoReplicator-0] WARN com.netflix.discovery.DiscoveryClient - DiscoveryClient_SYSTEM-SERVER/pc1:sy-server:xxxx - registration failed Cannot execute request on any known server
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
解决方法:
在你的配置文件中加上一下两行代码
我的问题就解决了
还有一种方法:就是看的的defaultZone地址和别的eureka的地址是否一致,也可能这个位置出错了