Unable to setup elasticsearch master slave architecture. Error "failed to send ping to"


#1

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?


(David Pilato) #2

Wrong ports. Use:

discovery.zen.ping.unicast.hosts: ["192.168.15.120:9300","192.168.15.120:9301"]

#5

I have edited my question. Sorry, made a mistake in the code. Kindly review my question. Thank you.


(David Pilato) #6

I'm still giving you the same answer.

Change with:

discovery.zen.ping.unicast.hosts: ["192.168.15.120:9300","192.168.15.120:9301"]

#7

Hi,
could you tell me from where the IP: 192.168.15.120 and ports 9300 and 9301 came from?
Thanks.


(David Pilato) #8

I did not noticed that you changed the IP from your original post.
For sure don't use the REST ports (9200) but transport ones (9300).


(system) #9