Skip to content
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

no option to get ip addresses instead of hostname #26

Open
exhesham opened this issue Mar 12, 2017 · 1 comment
Open

no option to get ip addresses instead of hostname #26

exhesham opened this issue Mar 12, 2017 · 1 comment

Comments

@exhesham
Copy link

exhesham commented Mar 12, 2017

when i send a curl request to receive the service hosts, i get only hostnames.
curl -X GET http://127.0.0.1:8078/eureka/hosts?appName=s2
when i set the configuration

eureka.instance.preferIpAddress=true

I still get hostnames instead of IP addresses.

In order to get the hostname, i had to change the file HostsHandler.java as follows:
hosts.add(instanceInfo.getIPAddr());

There should be an option to make it configurable

@dawangdw
Copy link

This may be a bug I would say, this project is no longer maintained I think, I saw this. Currently I am using spring sidecar(http://cloud.spring.io/spring-cloud-static/spring-cloud.html#_polyglot_support_with_sidecar). Hope it can help you. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants