栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

UFW防火墙后面的Elasticsearch集群

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

UFW防火墙后面的Elasticsearch集群

默认情况下,首选IPV6。您可以通过将java.net.preferIPv4Stack系统属性设置为来更改此行为

true

您还必须看到,默认情况下,ES绑定到
anyLocalAddress
(通常是
0.0.0.0
::0
)。您可以通过设置
network.bind_host
正确的IP地址来更改此设置。

参考[1.3]»模块»网络设置


更新:

首先,建议您在SO中禁用ipv6,您可以按照以下步骤操作:

/etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1net.ipv6.conf.default.disable_ipv6 = 1

要在正在运行的系统中禁用:

echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6

要么

sysctl -w net.ipv6.conf.all.disable_ipv6=1sysctl -w net.ipv6.conf.default.disable_ipv6=1

之后,您必须更改两个节点

elasticsearch.yml
的值以及
network.bind_host
它们各自的IP

# Elasticsearch, by default, binds itself to the 0.0.0.0 address, and listens# on port [9200-9300] for HTTP traffic and on port [9300-9400] for node-to-node# communication. (the range means that if the port is busy, it will automatically# try the next port).# Set the bind address specifically (IPv4 or IPv6):#network.bind_host: 10.0.0.1# Set the address other nodes will use to communicate with this node. If not# set, it is automatically derived. It must point to an actual IP address.#network.publish_host: 10.0.0.1

或设置

# Set both 'bind_host' and 'publish_host':#network.host: 10.0.0.1

最后,您必须验证网络适配器的配置,这两个适配器都必须使用之前使用的IP正确配置。

希望这可以帮助



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/399522.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号