Multiple nodes in ElasticSearch

前端 未结 4 435
长情又很酷
长情又很酷 2020-12-07 23:37

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

4条回答
  •  -上瘾入骨i
    2020-12-07 23:48

    In windows for 6.x version, command attributes change to

    elasticsearch -EsomeYamlPropety=someValue
    

    First You need change an elasticsearch.yml properties to:

    http.port: 9200-9299
    transport.tcp.port: 9300-9399
    node.max_local_storage_nodes: 2
    

    Because You cant run nodes on single port, and when I try to use command with argument -Ehttp.port=9201 nodes where cant see each other and they create two different clusters with the same name.

    Run the first node by a standard command:

    .\bin\elasticsearch
    

    Run the second node by command with attributes:

    .\bin\elasticsearch -Enode.name=NodeTwo -Enode.master=false
    

提交回复
热议问题