# Elasticsearch -2.3.0 BindTransportException on EC2

**URL:** <https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625>\
**Category:** Elasticsearch\
**Created:** [July 4, 2016, 9:11am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625 "2016-07-04T09:11:59Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivkumar](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@shivkumar](https://discuss.elastic.co/u/shivkumar)\
**Post date:** [July 4, 2016, 9:11am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/1 "2016-07-04T09:11:59Z")

</div>

Hello,

This is first time I am using elasticsearch . I am using AWS as my infrastructure.

I have launched 4 EC2 Instances with the following purpose:

1. Instance 1 : Elasticsearch Client
2. Instance 2 : Elasticsearch Master
3. Instance 3 : Elasticsearch Data Node - 1
4. Instance 4 : Elasticsearch Data Node - 2

**The following elastic-ips are used in the below section just for better understanding of configuration files**

**Elastic - ip**

**1.2.3.4** = Instance - 1

**5.6.7.8** = Instance - 2

**9.10.11.12** = Instance - 3

**13.14.15.16** = Instance - 4

**I am not using aws plugin for the configurations**.

I have configured the following parameters of elasticsearch.yml file on each of the instance as follows:

**Instance 1 : Elasticsearch Client**

1. [cluster.name](http://cluster.name) my-clustername
2. [node.name](http://node.name): Client
3. node.master: false
4. node.data: false
5. path.data: /home/ubuntu/elasticsearch/data/elasticsearch/nodes/0
6. network.host: **1.2.3.4 [Elastic-ip of my instance]**
7. discovery.zen.ping.multicast.enabled: false
8. discovery.zen.ping.unicast.hosts: ["1.2.3.4" , "5.6.7.8" , "9.10.11.12", "13.14.15.16"]

**Instance 2 : Elasticsearch Master**

1. [cluster.name](http://cluster.name) my-clustername
2. [node.name](http://node.name): Master
3. node.master: true
4. node.data: false
5. path.data: /home/ubuntu/elasticsearch/data/elasticsearch/nodes/0
6. network.host: **5.6.7.8 [Elastic-ip of my instance]**
7. discovery.zen.ping.multicast.enabled: false
8. discovery.zen.ping.unicast.hosts: ["1.2.3.4" , "5.6.7.8" , "9.10.11.12", "13.14.15.16"]

**Instance 3 : Elasticsearch Data Node -1**

1. [cluster.name](http://cluster.name) my-clustername
2. [node.name](http://node.name): Slave\_1
3. node.master: false
4. node.data: true
5. path.data: /home/ubuntu/elasticsearch/data/elasticsearch/nodes/0
6. network.host: **9.10.11.12 [Elastic-ip of my instance]**
7. discovery.zen.ping.multicast.enabled: false
8. discovery.zen.ping.unicast.hosts: ["1.2.3.4" , "5.6.7.8" , "9.10.11.12", "13.14.15.16"]

**Instance 4 : Elasticsearch Data Node -2**

1. [cluster.name](http://cluster.name) my-clustername
2. [node.name](http://node.name): Slave\_2
3. node.master: false
4. node.data: true
5. path.data: /home/ubuntu/elasticsearch/data/elasticsearch/nodes/0
6. network.host: **13.14.15.16 [Elastic-ip of my instance]**
7. discovery.zen.ping.multicast.enabled: false
8. discovery.zen.ping.unicast.hosts: ["1.2.3.4" , "5.6.7.8" , "9.10.11.12", "13.14.15.16"]

After all these setting when I start my elasicsearch service on my client instance I am facing the following exception.

Exception in thread "main" BindTransportException[Failed to bind to [9300-9400]]; nested: ChannelException[Failed to bind to: /1.2.3.4:9400]; nested: BindException[Cannot assign requested address];  
Likely root cause: java.net.BindException: Cannot assign requested address  
at sun.nio.ch.Net.bind0(Native Method)  
at sun.nio.ch.Net.bind(Net.java:433)  
at sun.nio.ch.Net.bind(Net.java:425)  
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)  
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)  
at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)  
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391)  
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315)  
at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)  
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
at java.lang.Thread.run(Thread.java:745)  
Refer to the log for complete error details.

The above error I am getting on each of my instance when I start elasticsearch service.  
I am not understanding the root cause and reason for this error and what is the solution to overcome this problem.

I hope I am clear with my question and other details.

Thank you.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 4, 2016, 9:33am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/2 "2016-07-04T09:33:54Z")

</div>

> [@shivkumar](#):
>
> I am not using aws plugin for the configurations.

Why not?

> [@shivkumar](#):
>
> node.name: Slave\_1

There's no such thing as a slave in ES, you may want to change it.

Also, in general, having a single node with multiple data nodes is not a good idea, see [Important Configuration Changes | Elasticsearch: The Definitive Guide [2.x] | Elastic](https://www.elastic.co/guide/en/elasticsearch/guide/2.x/important-configuration-changes.html#_minimum_master_nodes)

> [@shivkumar](#):
>
> discovery.zen.ping.multicast.enabled: false

This is pointless in 2.X, what version are you on?

> [@shivkumar](#):
>
> Exception in thread "main" BindTransportException[Failed to bind to [9300-9400]]; nested: ChannelException[Failed to bind to: /1.2.3.4:9400]; nested: BindException[Cannot assign requested address];

Where is it getting 9400 from? Have you set an interface for ES to listen on?

---

<div class="post-metadata">

**Author:** ![shivkumar](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@shivkumar](https://discuss.elastic.co/u/shivkumar)\
**Post date:** [July 4, 2016, 9:40am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/3 "2016-07-04T09:40:31Z")

</div>

Thank you for your response.

1. I am using version 2.3.0.
2. I did not mentioned port number anywhere is my elasticsearch.yml file you can see clearly in my above configuration.
3. I am not using plugin because I want to understand the properties and its use.

Thank you

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 4, 2016, 9:44am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/4 "2016-07-04T09:44:35Z")

</div>

Is that the entire config?

---

<div class="post-metadata">

**Author:** ![shivkumar](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@shivkumar](https://discuss.elastic.co/u/shivkumar)\
**Post date:** [July 4, 2016, 9:45am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/5 "2016-07-04T09:45:44Z")

</div>

Yes Sir, the properties which I have shown are the only properties which I have changed.  
Thank you

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 4, 2016, 9:46am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/6 "2016-07-04T09:46:49Z")

</div>

Then you need to set `network.host` as well - [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#common-network-settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#common-network-settings)

---

<div class="post-metadata">

**Author:** ![shivkumar](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@shivkumar](https://discuss.elastic.co/u/shivkumar)\
**Post date:** [July 4, 2016, 9:51am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/7 "2016-07-04T09:51:21Z")

</div>

Sir please look at the point 6 in each of the configuration which I listed above.  
I have configured network.host to the elastic ip of each of my instance respectively.  
I hope I am doing nothing wrong by setting network.host to the elastic-ip of the instance.  
And I also I have changed [node.name](http://node.name) to DataNode\_1 🙂  
Thank you

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 4, 2016, 9:51am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/8 "2016-07-04T09:51:42Z")

</div>

Oh right, sorry your config is really hard to read like that.

---

<div class="post-metadata">

**Author:** ![shivkumar](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@shivkumar](https://discuss.elastic.co/u/shivkumar)\
**Post date:** [July 6, 2016, 6:06am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/9 "2016-07-06T06:06:46Z")

</div>

Hello,

I am using EC2 plugin now and I have made the following configuration in my elasticsearch.yml.

**[cluster.name](http://cluster.name): mycluster**

**[node.name](http://node.name): Master\_1**  
**node.master: true**  
**node.data: false**

**path.data: /home/ubuntu/elasticsearch/data/elasticsearch/nodes/0**

**network.host: \_ec2\_**

**cloud:**  
**aws:**  
**access\_key: xx**  
**secret\_key: xx**  
**region: us-east-1**  
**discovery:**  
**type: ec2**

The same settings I have made on my Data Node instances and have changed only the following parameter:  
**[node.name](http://node.name): DataNode\_1**  
**node.master: false**  
**node.data: true**

My each service is running perfectly, but when I look at my cluster using ElasticHQ , which I have installed on my Master node , I am able to see mymaster node but I am not able to see my data node.

What may be the problem ?

Thank you

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 6, 2016, 6:10am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/10 "2016-07-06T06:10:50Z")

</div>

Check your ES logs on the other nodes, it should mention something.  
Also check your security groups.

---

<div class="post-metadata">

**Author:** ![shivkumar](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@shivkumar](https://discuss.elastic.co/u/shivkumar)\
**Post date:** [July 6, 2016, 9:13am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/11 "2016-07-06T09:13:14Z")

</div>

I have allowed all the traffic for inbound and outbound in my security group.

The following is my log file for Data Node:

[2016-07-06 09:05:55,815][INFO][node] [Data Node\_1] version[2.3.0], pid[1360], build[8371be8/2016-03-29T07:54:48Z]  
[2016-07-06 09:05:55,816][INFO][node] [Data Node\_1] initializing ...  
[2016-07-06 09:05:57,037][INFO][plugins] [Data Node\_1] modules [reindex, lang-expression, lang-groovy], plugins [cloud-aws], sites []  
[2016-07-06 09:05:57,081][INFO][env] [Data Node\_1] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable\_space [5.6gb], net total\_space [7.7gb], spins? [no], types [ext4]  
[2016-07-06 09:05:57,081][INFO][env] [Data Node\_1] heap size [1015.6mb], compressed ordinary object pointers [true]  
[2016-07-06 09:05:57,081][WARN][env] [Data Node\_1] max file descriptors [64000] for elasticsearch process likely too low, consider increasing to at least [65536]  
[2016-07-06 09:06:00,590][INFO][node] [Data Node\_1] initialized  
[2016-07-06 09:06:00,593][INFO][node] [Data Node\_1] starting ...  
[2016-07-06 09:06:00,714][INFO][transport] [Data Node\_1] publish\_address {10.0.0.235:9300}, bound\_addresses {10.0.0.235:9300}  
[2016-07-06 09:06:00,718][INFO][discovery] [Data Node\_1] mycluster/DRurfcDaS\_KgC11ot5Fnkg  
[2016-07-06 09:06:30,735][WARN][discovery] [Data Node\_1] waited for 30s and no initial state was set by the discovery  
[2016-07-06 09:06:30,752][INFO][http] [Data Node\_1] publish\_address {10.0.0.235:9200}, bound\_addresses {10.0.0.235:9200}  
[2016-07-06 09:06:30,752][INFO][node] [Data Node\_1] started  
~

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 6, 2016, 10:29am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/12 "2016-07-06T10:29:00Z")

</div>

You could change the log level for `cloud.aws` and `discovery.ec2` packages to `DEBUG` and see what it tells.

Please format your logs before posting using `</>` icon.

---

<div class="post-metadata">

**Author:** ![shivkumar](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@shivkumar](https://discuss.elastic.co/u/shivkumar)\
**Post date:** [July 6, 2016, 10:44am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/13 "2016-07-06T10:44:10Z")

</div>

Thank you sir,

Will take care from next time.

---

<div class="post-metadata">

**Author:** ![shivkumar](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@shivkumar](https://discuss.elastic.co/u/shivkumar)\
**Post date:** [July 6, 2016, 10:49am UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/14 "2016-07-06T10:49:54Z")

</div>

Solved.

I don't know how but I rebooted my instance and all is working fine.

One more thing I want to know. Is there any open source notification tool for ES Cluster.

Thank you everyone for response and time.

---

<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:37pm UTC](https://discuss.elastic.co/t/elasticsearch-2-3-0-bindtransportexception-on-ec2/54625/15 "2017-07-05T22:37:42Z")

</div>


