# Nodes not discovering each other

**URL:** <https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565>\
**Category:** Elasticsearch\
**Created:** [December 18, 2015, 11:12am UTC](https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565 "2015-12-18T11:12:56Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![shashankvivek](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@shashankvivek](https://discuss.elastic.co/u/shashankvivek)\
**Post date:** [December 18, 2015, 11:12am UTC](https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565/1 "2015-12-18T11:12:56Z")

</div>

We tried with unicast.

`discovery.zen.ping.unicast.hosts: ["hostname:9200", "hostname:9200"]`

Even tried to set 1 node as master using `node.master=true`  
Still getting following error log  
Both nodes are in same network  
We are able to ping nodes from each other as well as telnet to 9200 is working.  
Can somebody please help here?

[2015-12-18 00:52:45,071][WARN][discovery.zen.ping.unicast] [plab\_node\_201] failed to send ping to [{#zen\_unicast\_2#}{[xx.xx.xx.xxx](http://xx.xx.xx.xxx)}{hostname/xx.xx.xx.xxx:9200}]  
ReceiveTimeoutTransportException[[][hostname/xx.xx.xx.xxx:9200][internal:discovery/zen/unicast] request\_id [389] timed out after [3750ms]]

This topic is similar to but do not have solution  
[Failed to send ping to](https://discuss.elastic.co/t/failed-to-send-ping-to/1235)

---

<div class="post-metadata">

**Author:** ![yodog](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yodog/32/4822_2.png) [@yodog](https://discuss.elastic.co/u/yodog)\
**Post date:** [December 18, 2015, 11:29am UTC](https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565/2 "2015-12-18T11:29:44Z")

</div>

can you telnet from node-01 to node-02 on ports 9200 and 9300?

`telnet xx.xx.xx.xxx 9200`  
`telnet xx.xx.xx.xxx 9300`

if you're not sure about what i'm talking about, execute the above command and copy/paste the result here.

* * *

ah, you already said that telnet is working... my bad.

---

<div class="post-metadata">

**Author:** ![shashankvivek](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@shashankvivek](https://discuss.elastic.co/u/shashankvivek)\
**Post date:** [December 18, 2015, 11:38am UTC](https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565/3 "2015-12-18T11:38:32Z")

</div>

Yes, Telnet is working on those nodes at port 9200 & 9300

---

<div class="post-metadata">

**Author:** ![yodog](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yodog/32/4822_2.png) [@yodog](https://discuss.elastic.co/u/yodog)\
**Post date:** [December 18, 2015, 11:42am UTC](https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565/4 "2015-12-18T11:42:47Z")

</div>

have you tried without specifying ports?

my `elasticsearch.yml` is like this:

```
# Elasticsearch nodes will find each other via unicast, by default.
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]

discovery.zen.ping.unicast.hosts: ["elastic-node-01", "elastic-node-02", "elastic-node-03"]

```

* * *

also, i **think** the `node.master=true` param does not set the node as master, only makes it eligible as master.  
meaning you can have this parameter on both nodes.

i might be wrong.

---

<div class="post-metadata">

**Author:** ![shashankvivek](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@shashankvivek](https://discuss.elastic.co/u/shashankvivek)\
**Post date:** [December 18, 2015, 11:50am UTC](https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565/5 "2015-12-18T11:50:09Z")

</div>

After removing ports

`[2015-12-18 03:48:59,410][INFO][discovery.zen] [plab_node_201] failed to send join request to master [{plab_node_202}{rWxRMAyWQBi0eEiBmVcdJg}{127.0.0.1}{127.0.0.1:9300}{master=true}], reason [RemoteTransportException[[plab_node_201][127.0.0.1:9300][internal:discovery/zen/join]]; nested: IllegalStateException[Node [{plab_node_201}{EgEo2WlTTBWqAAh6FwN86w}{127.0.0.1}{127.0.0.1:9300}{master=false}] not master for join request]; ]`

---

<div class="post-metadata">

**Author:** ![yodog](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yodog/32/4822_2.png) [@yodog](https://discuss.elastic.co/u/yodog)\
**Post date:** [December 18, 2015, 11:55am UTC](https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565/6 "2015-12-18T11:55:55Z")

</div>

> [@shashankvivek](#):
>
> {master=false}] not master for join request

now set `node.master=true` on both hosts and `restart` the services.

---

<div class="post-metadata">

**Author:** ![shashankvivek](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@shashankvivek](https://discuss.elastic.co/u/shashankvivek)\
**Post date:** [December 18, 2015, 11:58am UTC](https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565/7 "2015-12-18T11:58:55Z")

</div>

same error ☹

---

<div class="post-metadata">

**Author:** ![yodog](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yodog/32/4822_2.png) [@yodog](https://discuss.elastic.co/u/yodog)\
**Post date:** [December 18, 2015, 12:59pm UTC](https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565/8 "2015-12-18T12:59:56Z")

</div>

can you post your `elasticsearch.yml` somewhere like [http://pastebin.com](http://pastebin.com) and link it here?

---

<div class="post-metadata">

**Author:** ![ralphlevan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ralphlevan/32/5580_2.png) [@ralphlevan](https://discuss.elastic.co/u/ralphlevan)\
**Post date:** [December 19, 2015, 1:17pm UTC](https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565/9 "2015-12-19T13:17:21Z")

</div>

I had exactly the same problem. Have you set the hostname for each host in the yaml file? The comments for that field don't make it look critical, but it is.

---

<div class="post-metadata">

**Author:** ![shashankvivek](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@shashankvivek](https://discuss.elastic.co/u/shashankvivek)\
**Post date:** [December 21, 2015, 4:10am UTC](https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565/10 "2015-12-21T04:10:01Z")

</div>

The issue was of multiple network interfaces failing discovery. By publishing specific ip address it got resolved. network.publish\_host and network.bind\_host in conf file was set to its own IP.

network.publish\_host: "[xx.xx.xx.xxx](http://xx.xx.xx.xxx)"  
network.bind\_host: "[xx.xx.xx.xxx](http://xx.xx.xx.xxx)"

---

<div class="post-metadata">

**Author:** ![nsaravanas](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@nsaravanas](https://discuss.elastic.co/u/nsaravanas)\
**Post date:** [September 23, 2016, 5:28am UTC](https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565/11 "2016-09-23T05:28:21Z")

</div>

It could be due to multiple instance of ES running on same machine, a corrupted/killed ES has not released the port, check the instances running by executing `jps`, if more than one is running, kill the one which is not releasing the port

I had the same issue, out of 12 indices only 8 recovered, checked the running ES instances, killed the one not terminated properly, it worked

Regards,  
Saravana

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [April 23, 2017, 9:37am UTC](https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565/12 "2017-04-23T09:37:20Z")

</div>

Hi,

I didnt understand your answer, I dont have network.publish\* or .bind\_host...  
what is this?

---

<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:** [July 5, 2017, 10:00pm UTC](https://discuss.elastic.co/t/nodes-not-discovering-each-other/37565/13 "2017-07-05T22:00:57Z")

</div>


