when configuring elasticsearch I ran into a problem with binding the listening interfaces. somehow the documentation does not provide how to setup multiple network interfaces (network def and bind def)
my intention is to setup the network.bind_host
as _eth1:ipv4_
and _local_
even when trying to setup the bind_host
as _local_
only,
the elastic search port 9200 is still only reachable by eth1 (of course i have restarted the server)
i have tested the firewall configuration by setting up a netcat server and this one works perfectly for that port
network.publish_host
?! .
network.bind_host: _eth1:ipv4_
network.publish_host: _eth1:ipv4_
network.host: _eth1:ipv4_
network.bind_host: _local_
network.publish_host: _eth1:ipv4_
network.host: _local_
PS: afaik the publish_host is the nic for the inter-server communication
Using a YAML list for the desired property:
network.bind_host:
- _local_
- _en0:ipv4_
If I understand this answer correctly, publish_host
should be _eth1:ipv4_
. Your publish_host
has to be a one of the interfaces to which elasticsearch binds via the bind_host
property.
The above linked answer is actually great, so I have to cite it here:
"bind_host" is the host that an Elasticsearch node uses in the socket bind call when starting the network. Due to socket programming model, you can "bind" to an address. By referencing an "address", the socket allows access to one or all underlying network devices. There are several addresses with predefined semantics, e.g. 0.0.0.0 is reserved for "bind to all network devices". So the "bind_host" address does not necessarily reflect a single unique address.
"publish_host" must be a single unique network address. It is used for connect calls by other nodes, not for socket bind call by the node itself. By using "publish_host" all nodes and clients can be sure they can connect to this node. Declaring this single unique address to the outside can be interpreted as "publishing", so it is called "publish_host".
You can not set "bind_host" and "publish_host" to arbitrary values, the values must adhere to the underlying socket model.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With