Not enough master nodes discovered during pinging (found [[]], but needed [1]), pinging again

HI Team,
I have 5 server and i want to form cluster.

Initially i'm working around 2 server cluster formation. my idea is 1 master and 4 data node.

when i try to form cluster formation between 2 server i'm getting master not discover error and anyone help me on this,

master conf:

    cluster.name: "docker-cluster"
    node.name: hostname1.node
    node.master: true
    node.data: false
    node.ingest: false
    network.host: 0.0.0.0
    network.publish_host:hostname1
    discovery.zen.ping.unicast.hosts: ["hostname1.com","hostname2.com"]
    discovery.zen.minimum_master_nodes: 1
    #xpack.license.self_generated.type: trial
    xpack.security.enabled: false
    xpack.monitoring.enabled : true
    #xpack.security.http.ssl.enabled: true
    #xpack.security.http.ssl.key: /usr/share/elasticsearch/config/elasticsearch/elasticsearch.key
    #xpack.security.http.ssl.certificate: /usr/share/elasticsearch/config/elasticsearch/elasticsearch.crt
    #xpack.security.http.ssl.client_authentication: none
    #xpack.security.http.ssl.verification_mode: certificate

Data conf:

cluster.name: "docker-cluster"
node.name: hostname2.node
node.master: false
node.data: true
node.ingest: false
network.host: 0.0.0.0
#bootstrap.memory_lock: true
discovery.zen.ping.unicast.hosts: ["hostname1.com","hostname2.com"]
discovery.zen.minimum_master_nodes: 1
network.publish_host: hostname2.com

#xpack.license.self_generated.type: trial
xpack.security.enabled: false
xpack.monitoring.enabled: true
#xpack.security.http.ssl.enabled: true
#xpack.security.http.ssl.key: /usr/share/elasticsearch/config/elasticsearch/elasticsearch.key
#xpack.security.http.ssl.certificate: /usr/share/elasticsearch/config/elasticsearch/elasticsearch.crt
#xpack.security.http.ssl.client_authentication: none
#xpack.security.http.ssl.verification_mode: certificate

curl -XGET 'http://localhost:9200/_cluster/state?pretty'

{
      "error" : {
        "root_cause" : [
          {
            "type" : "master_not_discovered_exception",
            "reason" : null
          }
        ],
        "type" : "master_not_discovered_exception",
        "reason" : null
      },
      "status" : 503
    }

when i run the curl command im getting below message on data server,

 curl -XGET 'http://localhost:9200/_cat/indices'
{"error":{"root_cause":[{"type":"master_not_discovered_exception","reason":null}],"type":"master_not_discovered_exception","reason":null},"status":503}

Are you sure that those nodes are able to communicate on the Elasticsearch port 9300? Do the hostnames resolve properly?

Thanks for your reply @fkelbert

please find the below response which im getting,
telnet xx.xx.xx.xx 9300
Trying xx.xx.xx.xx...
telnet: connect to address xx.xx.xx.xx: Connection refused

Quick info i'm using x-pack and i already the "xpack.ml.enabled: true"

i didnt get this point

how can i check the communication of port 9300

Issue resolved @fkelbert

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