Creating elasticsearch cluster on the same machine


(Satish) #1

I have a use case where I need to create a single elasticsearch cluster of multiple nodes on the same machine. I have a heavy hardware and this is for a dev environment only. I am using ES 6.2.2 and having hard time creating the cluster. I have made below changes to my elasticsearch.yml config file however both the nodes are started as individual master nodes for exactly the same cluster. Can somebody please help.

Below is the configuration:

$ pwd
/data/elastic/elasticsearch-6.2.2-node1
$ sed 's/^#.*//;/^$/d' config/elasticsearch.yml
cluster.name: cluster1
network.publish_host: 192.168.56.213
network.host: 192.168.56.213
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["192.168.56.213:9302"]

$ pwd
/data/elastic/elasticsearch-6.2.2-node2
$ sed 's/^#.*//;/^$/d' config/elasticsearch.yml
cluster.name: cluster1
network.host: 192.168.56.213
http.port: 9202
transport.tcp.port: 9302
discovery.zen.ping.unicast.hosts: ["192.168.56.213:9300"]

(Satish) #2

Sorry there was a typo in discovery.zen.ping.unicast.hosts for the second node. After fixing it worked. Updated the original post with fixed version. :grinning:


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.