I copied the SampleEurekaClient.java, eureka-client.props and eureka-client-test.props files to another project and could not get things to run. I found that the serviceUrls were null, leading to the error "No matches for the virtual host name :sampleservice.mydomain.net".
To compare, when I run the SampleEurekaClient from eureka/eureka-server/runservice.sh then the serviceUrl gets set correctly. This is because it's found in conf/sampleservice/sample-eureka-service.properties under the eureka.serviceUrl.default key.
For the Eureka Server Configuration section at https://github.com/Netflix/eureka/wiki/Running-the-Demo-Application it seems to imply that I'd be editing either eureka.serviceUrl.defaultZone or eureka.serviceUrl.default.defaultZone This is what I was editing, but that's not being read by default. DefaultEurekaClientConfig.getEurekaServerServiceUrls loads up
namespace + "serviceUrl." + "default"
if it can't read from
namespace + "serviceUrl." + myZone
So now I know how to correctly set these serviceUrls (I think) but I'm wondering what's the best way, and why there are these different properties?
What is the use of eureka.serviceUrl.default.defaultZone (unless I name my zone 'default.defaultZone')?
Why are there these properties in eureka-client.properties to set eureka.serviceUrl.*.defaultZone if there's a property eureka.region=default (not defaultZone)?
You should be okay just with
The idea behind this kind of property format is defined here. It is to support multiple zones for redundancy/failover to mitigate zonal failures.
--
You received this message because you are subscribed to the Google Groups "eureka_netflix" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eureka_netfli...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Is there any way to set "eureka.serviceUrl.default" at runtime?