I am trying to setup elasticsearch cluster for production environment. I am using two different hosts.
The config params on elasticsearch.yml are as follows:
node1:
cluster.name: my-cluster-1
node.name: node1
network.host: hostname1
transport.tcp.port: 9300
http.port: 9200
discovery.zen.minimum_master_nodes: 2
discovery.zen.ping.unicast.hosts: ["hostname2"]
node2:
cluster.name: my-cluster-1
node.name: node2
network.host: hostname2
transport.tcp.port: 9300
http.port: 9200
discovery.zen.minimum_master_nodes: 2
discovery.zen.ping.unicast.hosts: ["hostname1"]
When elasticsearch server is started on both nodes(node1 followed by node2), i am getting below error at node2:
[2017-04-25T03:11:00,467][INFO ][o.e.d.z.ZenDiscovery ] [node2] failed to send join request to master [{node1}{B8kpLtbiQEiK40iEDzWgxA}{5VtucMrhSVyEw6IshrVrjw}{hostname1}{10.248.9.42:9300}], reason [RemoteTransportException[[node1][10.248.9.42:9300][internal:discovery/zen/join]]; nested: ConnectTransportException[[node2][10.196.25.180:9300] connect_timeout[30s]]; nested: IOException[connection timed out: hostname2/10.196.25.180:9300]; ]
I am able to telnet to 9300 from each host to the other host. Hence I am not sure what is wrong? Kindly help me.