-
Notifications
You must be signed in to change notification settings - Fork 3.7k
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set hostname for eureka-client? #836
Comments
Hi @killjason the hostname should be automatically discovered by eureka-client. |
@qiangdavidliu, what about the IP address? |
@killjason same for ip address as well. The client auto detects your hostname and IP via standard system calls, and then (optionally, if in EC2) overlays these with data retrieved from calling the ec2 instance metadata url. |
@qiangdavidliu,what if the server have multi network interfaces? |
@killjason we don't yet support multiple interfaces. |
How does eureka-client decide which ip should use if have two interfaces? |
@killjason if the server is running on Amazon, it defaults to eth0. Otherwise, the default interface is whatever will be picked up by InetAddress.getLocalHost(). |
@killjason You can pass your own implementation of PropertiesInstanceConfig to the ApplicationManager. This implementation can override getHostName() and getIpAddress() in a way you want. |
@rfoltyns , I extends com.netflix.appinfo.MyDataCenterInstanceConfig to override getHostName() and getIpAddress(), is that OK? |
@killjason yeah, MyDataCenterInstanceConfig also extends this class |
How to set hostname for eureka-client which is registered in eureka-server?
The text was updated successfully, but these errors were encountered: