I have a standalone, embedded Eureka server powered by Spring Boot 1.2.0.RELEASE and Spring Cloud 1.0.0.RC1. I see services properly registering themselves in the dashboard, which is great. The status links are using the host name of the box they are running on. Unfortunately, we are using virtual machines and they don't register themselves in DNS, which means that the links are unresolvable. I started looking through the code but was unable to find a way to force the links to use the host's ip address instead. Having a broken dashboard is not the end of the world but I am afraid that once we start using Ribbon or Feign to contact services, those URLs will also use the host name and be unresolvable. Maybe what I am really asking is there a way to force the clients to register with an ip address instead of a host name? Any help is appreciated.
You can set your hostname at the run-time by using an environment variable — for example, eureka. instance. hostname=${HOST_NAME} .
Eureka naming server is a REST-based server that is used in the AWS Cloud services for load balancing and failover of middle-tier services. Eureka naming server is an application that holds information about all client service applications. Each microservice registers itself with the Eureka naming server.
According to the Eureka wiki (https://github.com/Netflix/eureka/wiki), the Eureka 2.0 has been discontinued. The open source work on eureka 2.0 has been discontinued. The code base and artifacts that were released as part of the existing repository of work on the 2. x branch is considered use at your own risk.
set eureka.instance.preferIpAddress=true
as documented here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With