elasticsearch 多个 nic 绑定网络接口
elasticsearch multiple nic bind network interfaces
简介
在配置 elasticsearch 时,我 运行 遇到绑定问题
监听接口。
不知何故,文档没有提供如何设置多个网络接口 (network def and bind def)
问题描述
我的意图是将 network.bind_host
设置为 _eth1:ipv4_
和 _local_
即使尝试将 bind_host
设置为仅 _local_
,
弹性搜索端口 9200 仍然只能通过 eth1 访问(当然我已经重新启动了服务器)
尝试过的解决方案
我已经通过设置 netcat 服务器测试了防火墙配置,这个服务器非常适合该端口
所以这会导致 2 个问题:
- 如何配置多网卡? (符号是什么?)
- 我需要更改
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 publish_host 是服务器间通信的网卡
对所需的 属性 使用 YAML list:
network.bind_host:
- _local_
- _en0:ipv4_
如果我理解this answer正确的话,publish_host
应该是_eth1:ipv4_
。您的 publish_host
必须是 elasticsearch 通过 bind_host
属性.
绑定的接口之一
上面的链接答案其实很棒,所以我不得不在这里引用它:
"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.
简介
在配置 elasticsearch 时,我 运行 遇到绑定问题 监听接口。 不知何故,文档没有提供如何设置多个网络接口 (network def and bind def)
问题描述
我的意图是将 network.bind_host
设置为 _eth1:ipv4_
和 _local_
即使尝试将 bind_host
设置为仅 _local_
,
弹性搜索端口 9200 仍然只能通过 eth1 访问(当然我已经重新启动了服务器)
我已经通过设置 netcat 服务器测试了防火墙配置,这个服务器非常适合该端口
所以这会导致 2 个问题:
- 如何配置多网卡? (符号是什么?)
- 我需要更改
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 publish_host 是服务器间通信的网卡
对所需的 属性 使用 YAML list:
network.bind_host: - _local_ - _en0:ipv4_
如果我理解this answer正确的话,
publish_host
应该是_eth1:ipv4_
。您的publish_host
必须是 elasticsearch 通过bind_host
属性. 绑定的接口之一
上面的链接答案其实很棒,所以我不得不在这里引用它:
"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.