Set multiple eureka servers for different zones. They are all ended up as unavailable replicas...
I have set up 3 elastic IP addresses in client config properties:
eureka.serviceUrl.us-west-2a=...
us-west2.com:7001/v2/
eureka.serviceUrl.us-west-2b= ...
us-west2.com:7001/v2/
eureka.serviceUrl.us-west-2c= ..
us-west2.com:7001/v2/
Run three instances. Each eureka got attached to elastic ip. Each eureka service registrated other service, however all replicas are unavailable.
Log shows null pointer exceptions:
2014-12-17 02:08:22,574 ERROR com.netflix.eureka.resources.StatusResource:97 [http-bio-7001-exec-9] [isReplicaAvailable] Could not determine if the replica is available
java.lang.NullPointerException at com.netflix.eureka.resources.StatusResource.isReplicaAvailable(StatusResource.java:90)
...
and
2014-12-17 00:06:01,274 ERROR com.netflix.eureka.PeerAwareInstanceRegistry:369 [localhost-startStop-1] [primeAwsReplicas] Could not contact null
java.lang.NullPointerException at com.netflix.eureka.PeerAwareInstanceRegistry.primeAwsReplicas(PeerAwareInstanceRegistry.java:342) at com.netflix.eureka.PeerAwareInstanceRegistry.openForTraffic(PeerAwareInstanceRegistry.java:305)
...
It comes down in the code to the null value extracted as:
Application app = PeerAwareInstanceRegistry.getInstance() .getApplication(myAppName, false);
and:
Application eurekaApps = this.getApplication( ApplicationInfoManager.getInstance().getInfo() .getAppName(), false);
I would appreciate help....