title: Data node can't connect to the master node cluster
body: <p>So, I have two elasticsearch servers (version 7 of elasticsearch) and wanted to form a cluster with master and data node, but I'm facing some difficulties in connecting them in a same cluster, these are my .yml files and the things I've tried so far, any help would be appreciated:</p>
  <p>xxx.235 yml: #data node</p>
  <pre><code>cluster.name: monitoring
  node.name: &quot;es-data-node-2&quot;
  node.master: false
  node.data: true
  
  path.data: /var/lib/elasticsearch
  path.logs: /var/log/elasticsearch
  
  network.host: xxx.235
  network.publish_host: xxx.52
  http.port: 9200
  
  discovery.seed_hosts: [&quot;xxx.52&quot;, &quot;xxx.235&quot;] #tried this instead as well discovery.zen.ping.unicast.hosts: 2
  discovery.zen.minimum_master_nodes: 2 #tried with 1 also
  cluster.initial_master_nodes: [&quot;xxx.52&quot;]
  </code></pre>
  <p>xxx.52 yml: #master node</p>
  <pre><code>cluster.name: monitoring
  node.name: &quot;es-master&quot;
  node.master: true
  node.data: false
  
  path.data: /var/lib/elasticsearch
  path.logs: /var/log/elasticsearch
  
  network.host: xxx.52
  http.port: 9200
  
  discovery.seed_hosts: [&quot;xxx.52&quot;, &quot;xxx.235&quot;] #tried this instead as well discovery.zen.ping.unicast.hosts: 2
  discovery.zen.minimum_master_nodes: 2 #tried with 1 also
  cluster.initial_master_nodes: [&quot;xxx.52&quot;]
  </code></pre>
  <p>Things I tried but didn't help:
  Enabling 9200 and 9300 ports and testing them via telnet and connection is good and ports are open.
  Adding the line publish_host on both servers.
  Switching between seed_hosts and zen.ping.unicast.hosts.</p>
  <p>Until I added the line
  node.master: false
  on the data node, it just got up but didn't connect to the right cluster, both nodes we're on their own separate clusters</p>