Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix network binding for ipv4/ipv6 #12942
Elasticsearch doesn't work well today with modern machines that might support both ipv4 and ipv6. The worst problem here that
Equally bad, we only bind to loopback by default for 2.0, so if you want to connect to the network "for real" you might provide an interface name, but that always tends to do the wrong thing too (#12915), e.g. pick link local or some other useless address.
This is a compromise fix that tries to keep things simple:
The default for which address to publish when bound to multiple addresses is pretty simple, we prefer ipv4 by default (java.net.preferIPv4Stack) and I think we should until things like multicast are fixed to work correct over ipv6. Otherwise we prefer "real addresses" > site local > link local and so on.
Some things are still a bit messy, because real cleanups need to not be right before a beta release.
So, an interesting byproduct of this is that if I have an ES node bind to the public interface with
I'm not sure if this is desired or not, I guess I would expect the