如何在 Loopback 和 Non-Loopback 接口上绑定 Elasticsearch 2.0? [英] How to bind Elasticsearch 2.0 on both Loopback and Non-Loopback interfaces?

查看:24
本文介绍了如何在 Loopback 和 Non-Loopback 接口上绑定 Elasticsearch 2.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从 2.0 版本开始,Elasticsearch 默认只绑定回环接口(_local_ 就配置而言).

Starting from version 2.0 Elasticsearch binds only on the loopback interface by default (_local_ in terms of configuration).

文档 说有一种方法可以切换到另一个网络,例如,_non_loopback_ 绑定到第一个非环回接口.它工作正常.

The documentation says that there is a way to switch to another network, for example, _non_loopback_ binds to the first non-loopback interface. It works fine.

但我不知道如何组合这些设置,以便 Elasticsearch 同时绑定环回和非环回接口?

But I cannot figure out how do I combine these settings so that Elasticsearch binds on both loopback and non-loopback interfaces simultaneously?

附注.我的原因是我在每个通过 localhost 连接到它的 Elasticsearch 实例上使用 Logstash,但我也希望其他 Elasticsearch 实例相互看到以形成集群...

PS. My reason is that I use Logstash on each Elasticsearch instance that connects to it via localhost, but I also want other Elasticsearch instances to see each other to form the cluster...

推荐答案

对于 2.0,您需要使用

For 2.0 you would need to use

network.bind_host: 0

这篇关于如何在 Loopback 和 Non-Loopback 接口上绑定 Elasticsearch 2.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆