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
Default to binding to loopback address #11483
Conversation
cool +1 |
|
||
The `network.publish_host` setting allows to control the host the node will | ||
publish itself within the cluster so other nodes will be able to connect to it. | ||
Of course, this can't be the `anyLocalAddress`, and by default, it will be the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They can't connect to it anyway if its only bound to a loopback, right?
+1 |
Tested 👍 |
Tested this on Linux, OSX, and Windows. All were able to form a cluster with the default settings using multicast. |
// 'null' here tells the socket to deter to the interface set | ||
// with .setInterface | ||
multicastSocket.joinGroup(addr, null); | ||
multicastSocket.setInterface(config.multicastInterface); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the negative side of applying this workaround on all platforms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multicast doesn't work on Linux or Windows with this workaround.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I see. I wonder if instead of having this hardcoded we can handle it with a setting that will default to the right value on Mac OS X (just in case this bug is fixed sometime in the future). Basically, can we do something similar to what we do with shared socket here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I will add that.
LGTM |
7c89152
to
65f4397
Compare
Binds to the address returned by `InetAddress.getLoopbackAddress()`. Closes elastic#11300
Binds to the address returned by
InetAddress.getLoopbackAddress()
.Closes #11300
Closes #7077