DiscoveryClient Error "was unable to refresh its cache!" for the first few minutes after startup

5,108 views
Skip to first unread message

haral...@gmail.com

unread,
Aug 19, 2016, 7:24:03 AM8/19/16
to eureka_netflix
Hi,

I have set up two servers like this:

1) I have downloaded eureka-server-1.4.11.war from Maven repository to eureka.war in tomcat/webapps.
2) I add these environment settings in setenv.sh to get a cluster with 2 hosts (not in AWS, no DNS):

-Deureka.environment=dev
-Deureka.name=service-registry
-Deureka.port=8080
-Deureka.region=sr-dev
-Deureka.vipAddress=sr-dev
-Deureka.sr-dev.availabilityZones=sr-dev1,sr-dev2
-Deureka.serviceUrl.sr-dev1=http://sr-host1:8080/eureka/v2/ -Deureka.serviceUrl.sr-dev2=http://sr-host2:8080/eureka/v2/

This seems to work and the service is registered after a while, listing both replicas, but it takes until about ~7 minutes uptime for the following error messages to magically disappear (in the meanwhile, the eureka status page says "This server is not allowing registry fetch for local registry"):

ERROR com.netflix.discovery.DiscoveryClient:951 [DiscoveryClient-CacheRefreshExecutor-0] [fetchRegistry] DiscoveryClient_SERVICE-REGISTRY/sr-host1 - 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

...
INFO com.netflix.discovery.DiscoveryClient:1026 [DiscoveryClient-CacheRefreshExecutor-0] [getAndStoreFullRegistry] Getting all instance registry info from the eureka server
WARN com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient:127 [DiscoveryClient-CacheRefreshExecutor-0] [execute] Request execution failure with status code 403; retrying on another server if available
WARN com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient:127 [DiscoveryClient-CacheRefreshExecutor-0] [execute] Request execution failure with status code 403; retrying on another server if available

Finally, however:
INFO com.netflix.eureka.registry.AbstractInstanceRegistry$EvictionTask:1254 [Eureka-EvictionTimer] [run] Running the evict task with compensationTime 0ms
INFO com.netflix.discovery.DiscoveryClient:937 [DiscoveryClient-CacheRefreshExecutor-0] [fetchRegistry] Disable delta property : false
INFO com.netflix.discovery.DiscoveryClient:938 [DiscoveryClient-CacheRefreshExecutor-0] [fetchRegistry] Single vip registry refresh property : null
INFO com.netflix.discovery.DiscoveryClient:939 [DiscoveryClient-CacheRefreshExecutor-0] [fetchRegistry] Force full registry fetch : false
INFO com.netflix.discovery.DiscoveryClient:940 [DiscoveryClient-CacheRefreshExecutor-0] [fetchRegistry] Application is null : false
INFO com.netflix.discovery.DiscoveryClient:941 [DiscoveryClient-CacheRefreshExecutor-0] [fetchRegistry] Registered Applications size is zero : true
INFO com.netflix.discovery.DiscoveryClient:943 [DiscoveryClient-CacheRefreshExecutor-0] [fetchRegistry] Application version is -1: true
INFO com.netflix.discovery.DiscoveryClient:1026 [DiscoveryClient-CacheRefreshExecutor-0] [getAndStoreFullRegistry] Getting all instance registry info from the eureka server
INFO com.netflix.discovery.DiscoveryClient:1035 [DiscoveryClient-CacheRefreshExecutor-0] [getAndStoreFullRegistry] The response status is 200

What is wrong with my configuration above or is this normal? Have I missed anything?

Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages