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

Add config option to provide IP matcher for CuratorAdvertiser to select correct local IP address #13

Open
stantonk opened this issue Dec 23, 2015 · 2 comments

Comments

@stantonk
Copy link

I'm not sure if this is the best way to solve this problem, but if you want to run a service locally and you use a VPN, the logic here:

will sometimes pick the wrong local IP if you are connected to a VPN.

17:54:36.566 [main] INFO  i.d.discovery.core.CuratorAdvertiser - Using '192.168.225.102' as listenAddress from found addresses: [/192.168.225.102, /10.0.1.101]

Easiest solution I can think of is do have a config param for dropwizard-discovery to match those addresses returned by ServiceInstanceBuilder.getAllLocalIPs(); against a regex pattern like "^10\.0\.1\.\d+" or something like that.

@jplock
Copy link
Member

jplock commented Dec 23, 2015

You can specify an IP in the configuration. Does that work?

@stantonk
Copy link
Author

@jplock it is a reasonable workaround for now, yes, but then the config can't be checked in and used by multiple developers who want to run integration tests. you'd have to manually modify the config each time you ran the tests on a different machine or on a different day (as IPs are dynamically allocated)

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