1. 程式人生 > >was unable to refresh its cache! status = Cannot execute request on any known server

was unable to refresh its cache! status = Cannot execute request on any known server

ERROR [main] c.n.d.s.t.d.RedirectingEurekaHttp
Client [RedirectingEurekaHttpClient.java:83] - Request execution error
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Con
nection refused:........
........
**Eureka**
was unable to refresh its cache! status = 
Cannot execute request on any known server

eureka-server啟動的時候報這個錯

原因:

Eureka服務註冊中心也會將自己作為客戶端來嘗試註冊它自己,出現衝突,所以我們需要禁用它的客戶端註冊行為。

解決辦法:

在yml或者properties檔案中加入

#eureka.client.register-with-eureka=false
#eureka.client.fetch-registry=false

即可