# Elasticsearch: adding a second node to the cluster - \[node-1\] master not discovered yet: have discovered \[{node-1}

**URL:** <https://discuss.elastic.co/t/elasticsearch-adding-a-second-node-to-the-cluster-node-1-master-not-discovered-yet-have-discovered-node-1/242529>\
**Category:** Elasticsearch\
**Created:** [July 24, 2020, 3:13pm UTC](https://discuss.elastic.co/t/elasticsearch-adding-a-second-node-to-the-cluster-node-1-master-not-discovered-yet-have-discovered-node-1/242529 "2020-07-24T15:13:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pauleccm](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@pauleccm](https://discuss.elastic.co/u/pauleccm)\
**Post date:** [July 24, 2020, 3:13pm UTC](https://discuss.elastic.co/t/elasticsearch-adding-a-second-node-to-the-cluster-node-1-master-not-discovered-yet-have-discovered-node-1/242529/1 "2020-07-24T15:13:52Z")

</div>

I am trying to obtain a two nodes cluster.  
First node, master (master-1):

```
cluster.name: "admin_system_elk"
network.host: 0.0.0.0
node.name: "master-1"
discovery.seed_hosts: "localhost:9300"
cluster.initial_master_nodes: "master-1"
http.port: 9200
transport.port: 9300
node.data: true
node.master: true
#bootstrap.memory_lock: true

xpack.license.self_generated.type: basic
xpack.security.enabled: true

xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: "http.p12"

```

Second node, not master (node-1):

```
cluster.initial_master_nodes: master-1
cluster.name: admin_system_elk
discovery.seed_hosts: [IP_OF_MASTER_1]:9300
http.port: 9200
node.data: true
node.master: false
node.name: node-1
transport.port: 9300
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: http.p12
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
xpack.security.transport.ssl.verification_mode: certificate

#################################### Paths ####################################

# Path to directory containing configuration (this file and logging.yml):

path.data: /opt/elasticsearch/data

path.logs: /opt/elasticsearch/logs

action.auto_create_index: true

```

I am able to `telnet [IP_OF_MASTER_1] 9300` without error.

Logs on node-1:

`[2020-07-24T17:14:25,470][WARN][o.e.c.c.ClusterFormationFailureHelper] [node-1] master not discovered yet: have discovered [{node-1}{MB9wyKmvQPaeA1-GZte6Dg}{tdYj5WsBRdynk6_dzYqRxA}{127.0.0.1}{127.0.0.1:9300}{dil}{ml.machine_memory=33625956352, xpack.installed=true, ml.max_open_jobs=20}]; discovery will continue using [[IP_OF_MASTER_1] :9300] from hosts providers and [] from last-known cluster state; node term 0, last-accepted version 0 in term 0`

This log is repeated every 10 seconds.

Logs on master-1:

```
{"type": "server", "timestamp": "2020-07-24T14:51:31,463Z", "level": "INFO", "component": "o.e.c.r.a.AllocationService", "cluster.name": "admin_system_elk", "node.name": "master-1", "message": "Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[.kibana_task_manager_1][0], [.apm-agent-configuration][0], [.kibana_1][0]]]).", "cluster.uuid": "dvelqHyZQX69AhTzMaHs9Q", "node.id": "MVG8PHMwSZ6z1Re4OLsd9Q" }

```

ELK 7.6.2

---

<div class="post-metadata">

**Author:** ![Sreekanth\_Ragi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sreekanth_ragi/32/58498_2.png) [@Sreekanth\_Ragi](https://discuss.elastic.co/u/Sreekanth_Ragi)\
**Post date:** [July 24, 2020, 3:40pm UTC](https://discuss.elastic.co/t/elasticsearch-adding-a-second-node-to-the-cluster-node-1-master-not-discovered-yet-have-discovered-node-1/242529/2 "2020-07-24T15:40:30Z")

</div>

Could you try changing the line

```auto
discovery.seed_hosts: "localhost:9300"

```

the same as node.

```auto
discovery.seed_hosts: [IP_OF_MASTER_1]:9300

```

---

<div class="post-metadata">

**Author:** ![pauleccm](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@pauleccm](https://discuss.elastic.co/u/pauleccm)\
**Post date:** [July 27, 2020, 8:44am UTC](https://discuss.elastic.co/t/elasticsearch-adding-a-second-node-to-the-cluster-node-1-master-not-discovered-yet-have-discovered-node-1/242529/3 "2020-07-27T08:44:15Z")

</div>

did not fix it

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 27, 2020, 8:48am UTC](https://discuss.elastic.co/t/elasticsearch-adding-a-second-node-to-the-cluster-node-1-master-not-discovered-yet-have-discovered-node-1/242529/4 "2020-07-27T08:48:06Z")

</div>

The second node also need network.host set to 0.0.0.0.

---

<div class="post-metadata">

**Author:** ![pauleccm](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@pauleccm](https://discuss.elastic.co/u/pauleccm)\
**Post date:** [July 27, 2020, 8:51am UTC](https://discuss.elastic.co/t/elasticsearch-adding-a-second-node-to-the-cluster-node-1-master-not-discovered-yet-have-discovered-node-1/242529/5 "2020-07-27T08:51:57Z")

</div>

still getting

```auto
    [node-1] master not discovered yet: have discovered [{node-1}{MB9wyKmvQPaeA1-GZte6Dg}{lpzawyqSQ5e6TTyQ5vSynA}{51.15.17.189}{51.15.17.189:9300}{dil}{ml.machine_memory=33625956352, xpack.installed=true, ml.max_open_jobs=20}]; discovery will continue using [MASTER_IP:9300] from hosts providers and [] from last-known cluster state;
            node term 0, last-accepted version 0 in term 0
```

---

<div class="post-metadata">

**Author:** ![pauleccm](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@pauleccm](https://discuss.elastic.co/u/pauleccm)\
**Post date:** [July 27, 2020, 8:54am UTC](https://discuss.elastic.co/t/elasticsearch-adding-a-second-node-to-the-cluster-node-1-master-not-discovered-yet-have-discovered-node-1/242529/6 "2020-07-27T08:54:56Z")

</div>

master side seems okay:

`{"type": "server", "timestamp": "2020-07-27T08:48:58,132Z", "level": "INFO", "component": "o.e.c.s.ClusterApplierService", "cluster.name": "admin_system_elk", "node.name": "master-1", "message": "master node changed {previous [], current [{master-1}{MVG8PHMwSZ6z1Re4OLsd9Q}{1syLdPA5TFyyAZDFpJmTDA}{172.29.0.2}{172.29.0.2:9300}{dilm}{ml.machine_memory=67328880640, xpack.installed=true, ml.max_open_jobs=20}]}, term: 102, version: 13424, reason: Publication{term=102, version=13424}" }`

`telnet localhost 9300` -\>

```auto
Trying ::1...
Connected to localhost.
Escape character is '^]'.
```

---

<div class="post-metadata">

**Author:** ![pauleccm](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@pauleccm](https://discuss.elastic.co/u/pauleccm)\
**Post date:** [July 27, 2020, 9:11am UTC](https://discuss.elastic.co/t/elasticsearch-adding-a-second-node-to-the-cluster-node-1-master-not-discovered-yet-have-discovered-node-1/242529/7 "2020-07-27T09:11:21Z")

</div>

master is running through docker, can there be special networking needed ?  
it is not a firewall issue for sure, as I deactivated firewall on both sides and it did not work better

---

<div class="post-metadata">

**Author:** ![pauleccm](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@pauleccm](https://discuss.elastic.co/u/pauleccm)\
**Post date:** [July 27, 2020, 10:37am UTC](https://discuss.elastic.co/t/elasticsearch-adding-a-second-node-to-the-cluster-node-1-master-not-discovered-yet-have-discovered-node-1/242529/8 "2020-07-27T10:37:44Z")

</div>

the issue was docker using docker local network ip (172.X.X.X) for network.publish.  
adding network.publish: [IP OF MASTER] to the master elasticsearch.yml configuration fixed the discovery issue.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 24, 2020, 10:51am UTC](https://discuss.elastic.co/t/elasticsearch-adding-a-second-node-to-the-cluster-node-1-master-not-discovered-yet-have-discovered-node-1/242529/9 "2020-08-24T10:51:28Z")

</div>

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