mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 09:54:06 -04:00
fix docs, fix another bug in multicast (publish host = bad here!)
This commit is contained in:
parent
88c462eb30
commit
b55d092811
3 changed files with 21 additions and 13 deletions
|
@ -131,7 +131,9 @@ public class MulticastZenPing extends AbstractLifecycleComponent<ZenPing> implem
|
||||||
boolean deferToInterface = settings.getAsBoolean("discovery.zen.ping.multicast.defer_group_to_set_interface", Constants.MAC_OS_X);
|
boolean deferToInterface = settings.getAsBoolean("discovery.zen.ping.multicast.defer_group_to_set_interface", Constants.MAC_OS_X);
|
||||||
multicastChannel = MulticastChannel.getChannel(nodeName(), shared,
|
multicastChannel = MulticastChannel.getChannel(nodeName(), shared,
|
||||||
new MulticastChannel.Config(port, group, bufferSize, ttl,
|
new MulticastChannel.Config(port, group, bufferSize, ttl,
|
||||||
networkService.resolvePublishHostAddress(address),
|
// don't use publish address, the use case for that is e.g. a firewall or proxy and
|
||||||
|
// may not even be bound to an interface on this machine! use the first bound address.
|
||||||
|
networkService.resolveBindHostAddress(address)[0],
|
||||||
deferToInterface),
|
deferToInterface),
|
||||||
new Receiver());
|
new Receiver());
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ respond to. It provides the following settings with the
|
||||||
|`ttl` |The ttl of the multicast message. Defaults to `3`.
|
|`ttl` |The ttl of the multicast message. Defaults to `3`.
|
||||||
|
|
||||||
|`address` |The address to bind to, defaults to `null` which means it
|
|`address` |The address to bind to, defaults to `null` which means it
|
||||||
will bind to all available network interfaces.
|
will bind `network.bind_host`
|
||||||
|
|
||||||
|`enabled` |Whether multicast ping discovery is enabled. Defaults to `true`.
|
|`enabled` |Whether multicast ping discovery is enabled. Defaults to `true`.
|
||||||
|=======================================================================
|
|=======================================================================
|
||||||
|
|
|
@ -9,13 +9,15 @@ network settings allows to set common settings that will be shared among
|
||||||
all network based modules (unless explicitly overridden in each module).
|
all network based modules (unless explicitly overridden in each module).
|
||||||
|
|
||||||
The `network.bind_host` setting allows to control the host different network
|
The `network.bind_host` setting allows to control the host different network
|
||||||
components will bind on. By default, the bind host will be `anyLoopbackAddress`
|
components will bind on. By default, the bind host will be `_local_`
|
||||||
(typically `127.0.0.1` or `::1`).
|
(loopback addresses such as `127.0.0.1`, `::1`).
|
||||||
|
|
||||||
The `network.publish_host` setting allows to control the host the node will
|
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.
|
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
|
Currently an elasticsearch node may be bound to multiple addresses, but only
|
||||||
first loopback address (if possible), or the local address.
|
publishes one. If not specified, this defaults to the "best" address from
|
||||||
|
`network.bind_host`. By default, IPv4 addresses are preferred to IPv6, and
|
||||||
|
ordinary addresses are preferred to site-local or link-local addresses.
|
||||||
|
|
||||||
The `network.host` setting is a simple setting to automatically set both
|
The `network.host` setting is a simple setting to automatically set both
|
||||||
`network.bind_host` and `network.publish_host` to the same host value.
|
`network.bind_host` and `network.publish_host` to the same host value.
|
||||||
|
@ -27,21 +29,25 @@ in the following table:
|
||||||
[cols="<,<",options="header",]
|
[cols="<,<",options="header",]
|
||||||
|=======================================================================
|
|=======================================================================
|
||||||
|Logical Host Setting Value |Description
|
|Logical Host Setting Value |Description
|
||||||
|`_local_` |Will be resolved to the local ip address.
|
|`_local_` |Will be resolved to loopback addresses
|
||||||
|
|
||||||
|`_non_loopback_` |The first non loopback address.
|
|`_local:ipv4_` |Will be resolved to loopback IPv4 addresses
|
||||||
|
|
||||||
|`_non_loopback:ipv4_` |The first non loopback IPv4 address.
|
|`_local:ipv6_` |Will be resolved to loopback IPv6 addresses
|
||||||
|
|
||||||
|`_non_loopback:ipv6_` |The first non loopback IPv6 address.
|
|`_non_loopback_` |Addresses of the first non loopback interface
|
||||||
|
|
||||||
|`_[networkInterface]_` |Resolves to the ip address of the provided
|
|`_non_loopback:ipv4_` |IPv4 addresses of the first non loopback interface
|
||||||
|
|
||||||
|
|`_non_loopback:ipv6_` |IPv6 addresses of the first non loopback interface
|
||||||
|
|
||||||
|
|`_[networkInterface]_` |Resolves to the addresses of the provided
|
||||||
network interface. For example `_en0_`.
|
network interface. For example `_en0_`.
|
||||||
|
|
||||||
|`_[networkInterface]:ipv4_` |Resolves to the ipv4 address of the
|
|`_[networkInterface]:ipv4_` |Resolves to the ipv4 addresses of the
|
||||||
provided network interface. For example `_en0:ipv4_`.
|
provided network interface. For example `_en0:ipv4_`.
|
||||||
|
|
||||||
|`_[networkInterface]:ipv6_` |Resolves to the ipv6 address of the
|
|`_[networkInterface]:ipv6_` |Resolves to the ipv6 addresses of the
|
||||||
provided network interface. For example `_en0:ipv6_`.
|
provided network interface. For example `_en0:ipv6_`.
|
||||||
|=======================================================================
|
|=======================================================================
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue