我开始使用 Elasticsearch 2.0。当我想在一个集群上使用多个节点时,它似乎不起作用。
我尝试了两种不同的方法来创建多节点。
首先,我使用本地主机并创建了两个 Elasticsearch 实例。
其次,我为这个多节点使用了两台不同的计算机(我的本地计算机上的一个实例和服务器中的一个实例,我用来discovery.zen.ping.unicast.hosts
绑定它们)。
它不同于 Elasticsearch 1.x 版本。我读到多播已经被删除。那么如何在 Elasticsearch 2.0 中为集群上的多节点设置配置文件?
这是我对不同服务器的配置设置
cluster.name: "cluster_node_1"
node.name: "test1_node1_ES2"
http.cors.enabled: true
index.number_of_shards: 5
index.number_of_replicas: 1
transport.tcp.port: 9300
http.port: 9200
http.cors.enable: true
network.bind_host: 10.21.126.151
network.publish_host: 10.21.126.151
network.host: 10.21.126.151
discovery.zen.ping.timeout: 3s
discovery.zen.ping.unicast.hosts: ["10.21.126.151", "10.21.126.145"]
谢谢