I am trying to setup 2 elasticsearch nodes in same ip, same cluster name, different node names, and different ports. I made 2 directories to put elasticsearch.yml and logging.yml, to launch 2 instances.
My configuration files are like below
config file 1
cluster.name: my_cluster_name
node.name: my_node_name
node.master: true
bootstrap.mlockall: true
network.host: 192.168.2.2
http.port: 9200
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["192.168.2.2:9200","192.168.2.2:9201"]
discovery.zen.minimum_master_nodes: 1
config file 2
cluster.name: my_cluster_name
node.name: my_node_name_2
node.master: false
node.data: true
bootstrap.mlockall: true
network.host: 192.168.2.2
http.port: 9201
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["192.168.2.2:9200","192.168.2.2:9201"]
discovery.zen.minimum_master_nodes: 1
I am getting the error
[WARN ][discovery.zen.ping.unicast] [my_node_name_2] failed to send ping to [{#zen_unicast_1#}{192.168.2.2}{192.168.2.2:9200}]
ReceiveTimeoutTransportException[[][192.168.2.2:9200][internal:discovery/zen/unicast] request_id [0] timed out after [3751ms]]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:679)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
How can I fix this?