ElasticSearch中的多个节点 [英] Multiple nodes in 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
$ p $另一个解决方案是创建3个不同的配置文件,并使用
$ 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 $ c $启动三个节点c>参数。
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屋!