Closed dadoonet closed 8 years ago
This was never supported, we added it for 2.2: #13954
Although IMO, separately the real problem here is that the wrong data type was passed in for a setting, since that one did not support arrays, and nothing gave an error about that
Thanks! I was wondering why it was correct in code and when I was running a unit test... Was on 2.x branch! :(
I'm closing this then. I think your comment is already covered by another issue IIRC.
BTW I think we don't have unit test for multiple addresses in 2.x. I just looked at NetworkServiceTests
.
Do you think I should send a PR to add this test?
public void testBindMultipleAddresses() throws Exception {
NetworkService service = new NetworkService(Settings.EMPTY);
InetAddress[] addresses = service.resolveBindHostAddresses(new String[]{"127.0.0.1", "127.0.0.2"});
assertThat(addresses.length, is(2));
}
as long as it does not actually bind or rely on local configuration (e.g. number of interfaces) its a good idea.
When you define in
elasticsearch.yml
:It fails as expected:
When you wrap it in an array, it's totally ignored:
It means that you can't define a list of bind_host as:
From discussion: https://discuss.elastic.co/t/es-2-1-only-bind-on-localhost/36720