web-dev-qa-db-ja.com

DiscoveryClient_xxx:111-222:8080-キャッシュを更新できませんでした! status =既知のサーバーでリクエストを実行できません

DiscoveryClient_xxx:111-222:8080-キャッシュを更新できませんでした! status =既知のサーバーでリクエストを実行できません:

LocalhostでSpringCloudアプリケーションを実行し、localhost eurekaに登録しましたが、次の出力が得られました。

Request execution error
com.Sun.jersey.api.client.ClientHandlerException: Java.net.ConnectException: Connection refused
at 

017-07-01 13:13:41 [DiscoveryClient-CacheRefreshExecutor-0] (DiscoveryClient.Java:937)  - Disable delta property : false
2017-07-01 13:13:41 [DiscoveryClient-CacheRefreshExecutor-0] (DiscoveryClient.Java:938)  - Single vip registry refresh property : null
2017-07-01 13:13:41 [DiscoveryClient-CacheRefreshExecutor-0] (DiscoveryClient.Java:939)  - Force full registry fetch : false
2017-07-01 13:13:41 [DiscoveryClient-CacheRefreshExecutor-0] (DiscoveryClient.Java:940)  - Application is null : false
2017-07-01 13:13:41 [DiscoveryClient-CacheRefreshExecutor-0] (DiscoveryClient.Java:941)  - Registered Applications size is zero : true
2017-07-01 13:13:41 [DiscoveryClient-CacheRefreshExecutor-0] (DiscoveryClient.Java:943)  - Application version is -1: true
2017-07-01 13:13:41 [DiscoveryClient-CacheRefreshExecutor-0] (DiscoveryClient.Java:1026)  - Getting all instance registry info from the eureka server
2017-07-01 13:13:41 [DiscoveryClient-CacheRefreshExecutor-0] (RedirectingEurekaHttpClient.Java:83)  - Request execution error
com.Sun.jersey.api.client.ClientHandlerException: Java.net.ConnectException: Connection refused
at com.Sun.jersey.client.Apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.Java:187) ~[jersey-Apache-client4-1.19.1.jar:1.19.1]
at         com.Sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.Java:123) ~[jersey-client-1.19.1.jar:1.19.1]
at     com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.Java:27) ~[eureka-client-1.4.12.jar:1.4.12]
at com.Sun.jersey.api.client.Client.handle(Client.Java:652) ~[jersey-client-1.19.1.jar:1.19.1]
at com.Sun.jersey.api.client.WebResource.handle(WebResource.Java:682) ~[jersey-client-1.19.1.jar:1.19.1]
at com.Sun.jersey.api.client.WebResource.access$200(WebResource.Java:74) ~[jersey-client-1.19.1.jar:1.19.1]
at com.Sun.jersey.api.client.WebResource$Builder.get(WebResource.Java:509) ~[jersey-client-1.19.1.jar:1.19.1]
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getApplicationsInternal(AbstractJerseyEurekaHttpClient.Java:194) ~[eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getApplications(AbstractJerseyEurekaHttpClient.Java:165) ~[eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.Java:137) ~[eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.Java:73) ~[eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.Java:134) ~[eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.Java:137) ~[eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.Java:118) ~[eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.Java:79) [eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.Java:134) [eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.Java:137) [eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.Java:119) [eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.Java:134) [eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.Java:137) [eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.Java:77) [eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.Java:134) [eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.DiscoveryClient.getAndStoreFullRegistry(DiscoveryClient.Java:1030) [eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.Java:944) [eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.Java:1468) [eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.Java:1435) [eureka-client-1.4.12.jar:1.4.12]
at Java.util.concurrent.Executors$RunnableAdapter.call(Executors.Java:511) [?:1.8.0_92]
at Java.util.concurrent.FutureTask.run(FutureTask.Java:266) [?:1.8.0_92]
at Java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.Java:1142) [?:1.8.0_92]
at Java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.Java:617) [?:1.8.0_92]
at Java.lang.Thread.run(Thread.Java:745) [?:1.8.0_92]
Caused by: Java.net.ConnectException: Connection refused
at Java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_92]
at Java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.Java:350) ~[?:1.8.0_92]
at Java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.Java:206) ~[?:1.8.0_92]
at Java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.Java:188) ~[?:1.8.0_92]
at Java.net.SocksSocketImpl.connect(SocksSocketImpl.Java:392) ~[?:1.8.0_92]
at Java.net.Socket.connect(Socket.Java:589) ~[?:1.8.0_92]
at org.Apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.Java:121) ~[httpclient-4.5.3.jar:4.5.3]
at org.Apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.Java:180) ~[httpclient-4.5.3.jar:4.5.3]
at org.Apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.Java:144) ~[httpclient-4.5.3.jar:4.5.3]
at org.Apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.Java:134) ~[httpclient-4.5.3.jar:4.5.3]
at org.Apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.Java:610) ~[httpclient-4.5.3.jar:4.5.3]
at org.Apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.Java:445) ~[httpclient-4.5.3.jar:4.5.3]
at org.Apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.Java:835) ~[httpclient-4.5.3.jar:4.5.3]
at org.Apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.Java:118) ~[httpclient-4.5.3.jar:4.5.3]
at org.Apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.Java:56) ~[httpclient-4.5.3.jar:4.5.3]
at com.Sun.jersey.client.Apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.Java:173) ~[jersey-Apache-client4-1.19.1.jar:1.19.1]
... 30 more
2017-07-01 13:13:41 [DiscoveryClient-CacheRefreshExecutor-0] (RetryableEurekaHttpClient.Java:129)  - Request execution failure
2017-07-01 13:13:41 [DiscoveryClient-CacheRefreshExecutor-0] (DiscoveryClient.Java:951)  - DiscoveryClient_JGJ-SFB/10.2.238.227:jgj-sfb:9875 - was unable to refresh its cache! status = Cannot execute request on any known server
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.Java:111) ~[eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.Java:134) ~[eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.Java:137) ~[eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.Java:77) ~[eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.Java:134) ~[eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.DiscoveryClient.getAndStoreFullRegistry(DiscoveryClient.Java:1030) ~[eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.Java:944) [eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.Java:1468) [eureka-client-1.4.12.jar:1.4.12]
at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.Java:1435) [eureka-client-1.4.12.jar:1.4.12]
at Java.util.concurrent.Executors$RunnableAdapter.call(Executors.Java:511) [?:1.8.0_92]
at Java.util.concurrent.FutureTask.run(FutureTask.Java:266) [?:1.8.0_92]
at Java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.Java:1142) [?:1.8.0_92]
at Java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.Java:617) [?:1.8.0_92]
at Java.lang.Thread.run(Thread.Java:745) [?:1.8.0_92]
2017-07-01 13:13:41 [DiscoveryClient-InstanceInfoReplicator-0] (DiscoveryClient.Java:812)  - DiscoveryClient_JGJ-SFB/10.2.238.227:jgj-sfb:9875: registering service...
2017-07-01 13:13:41 [DiscoveryClient-InstanceInfoReplicator-0] (RedirectingEurekaHttpClient.Java:83)  - Request execution error
com.Sun.jersey.api.client.ClientHandlerException: Java.net.ConnectException: Connection refused
at     com.Sun.jersey.client.Apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.Java:187) ~[jersey-Apache-client4-1.19.1.jar:1.19.1]
at com.Sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.Java:123) ~[jersey-client-1.19.1.jar:1.19.1]
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.Java:27) ~[eureka-client-1.4.12.jar:1.4.12]
at com.Sun.jersey.api.client.Client.handle(Client.Java:652) ~[jersey-client-1.19.1.jar:1.19.1]
at com.Sun.jersey.api.client.WebResource.handle(WebResource.Java:682) ~[jersey-client-1.19.1.jar:1.19.1]
at com.Sun.jersey.api.client.WebResource.access$200(WebResource.Java:74) ~[jersey-client-1.19.1.jar:1.19.1]
at com.Sun.jersey.api.client.WebResource$Builder.post(WebResource.Java:570) ~[jersey-client-1.19.1.jar:1.19.1]

どうしたの?

6
wpp

以下のプロパティをapplication.propertiesに追加すると、問題が修正されました。試してみてください。

eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
2
Divya
eureka:
  instance:
    hostname: localhost
  client:
    register-with-eureka: false
    fetch-registry: false
    serviceUrl:
      defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/

ハーフアングル文字を確認します

0
zzyymaggie