ElasticSearch中的多个节点 [英] Multiple nodes in ElasticSearch

查看:116
本文介绍了ElasticSearch中的多个节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在我的ElasticSearch中有多个节点?我在elasticsearch.yml中使用以下内容,但只有最后一个节点启动,浏览器会抱怨:文件中的页面:// localhost /说:undefined 。 p>

  node.name:No Data
node.master:true
node.data:false

node.name:Data One
node.master:false
node.data:true

node.name:Data Two
node.master:false
node.data:true


解决方案

我认为最简单的方法是在命令行中指定这些参数。要启动三个节点,只需要在elasticsearch主目录中运行以下三个命令:

  $ bin / elasticsearch -Des.node .data = false -Des.node.master = true -Des.node.name = NoData 
$ bin / elasticsearch -Des.node.data = true -Des.node.master = false -Des.node.name = DataOne
$ bin / elasticsearch -Des.node.data = true -Des.node.master = false -Des.node.name = DataTwo
-Des.config = path-to-config-file 参数。


How can I have multiple nodes in my ElasticSearch? I'm using the following in elasticsearch.yml but only the last node starts, and the browser complains: The page at file://localhost/ says: undefined.

node.name: "No Data"
node.master: true
node.data: false

node.name: "Data One"
node.master: false
node.data: true

node.name: "Data Two"
node.master: false
node.data: true

解决方案

I think the simplest way to do it is by specifying these parameters on the command line. To start three nodes you just need to run the following three commands in elasticsearch home directory:

$ bin/elasticsearch -Des.node.data=false -Des.node.master=true -Des.node.name=NoData
$ bin/elasticsearch -Des.node.data=true -Des.node.master=false -Des.node.name=DataOne
$ bin/elasticsearch -Des.node.data=true -Des.node.master=false -Des.node.name=DataTwo

Another solution is to create 3 different config files and start three nodes with -Des.config=path-to-config-file parameter.

这篇关于ElasticSearch中的多个节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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