Set multiple eureka servers for different zones. They are all ended up as unavailable replicas

732 views
Skip to first unread message

eds...@gmail.com

unread,
Dec 16, 2014, 10:26:07 PM12/16/14
to eureka_...@googlegroups.com
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....

eds...@gmail.com

unread,
Dec 17, 2014, 2:54:11 PM12/17/14
to eureka_...@googlegroups.com, eds...@gmail.com
Found the solution of the problem: eureka.registration.enabled property should be set in environment: eureka.registration.enabled=true.
Reply all
Reply to author
Forward
0 new messages