# Unable to start ES2 and ES5 on specific machine

**URL:** <https://discuss.elastic.co/t/unable-to-start-es2-and-es5-on-specific-machine/85807>\
**Category:** Elasticsearch\
**Created:** [May 15, 2017, 6:26pm UTC](https://discuss.elastic.co/t/unable-to-start-es2-and-es5-on-specific-machine/85807 "2017-05-15T18:26:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![grokos](https://avatars.discourse-cdn.com/v4/letter/g/858c86/32.png) [@grokos](https://discuss.elastic.co/u/grokos)\
**Post date:** [May 15, 2017, 6:26pm UTC](https://discuss.elastic.co/t/unable-to-start-es2-and-es5-on-specific-machine/85807/1 "2017-05-15T18:26:51Z")

</div>

Hi.

I am trying to run ES5 on a linux box. It keeps failing to start giving same exception about port 9200 is in use which is not in use.  
When I set host to 127.0.0.1 it starts up ok with no errors and is not accessible from network, only locally.  
Any other type of host(or IP) give me same error that port in in use.  
Same happens for ES2 on same machine.  
Is there a specific system parameter I need to check for that?

I just keep getting same error:

[2017-05-10T11:48:02,724][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [es5-tools-test-1] uncaught exception in thread [main]  
org.elasticsearch.bootstrap.StartupException: BindHttpException[Failed to bind to [9200]]; nested: BindException[Address already in use];  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-5.2.1.jar:5.2.1]  
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-5.2.1.jar:5.2.1]  
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) ~[elasticsearch-5.2.1.jar:5.2.1]  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.2.1.jar:5.2.1]  
at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.2.1.jar:5.2.1]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) ~[elasticsearch-5.2.1.jar:5.2.1]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) ~[elasticsearch-5.2.1.jar:5.2.1]  
Caused by: org.elasticsearch.http.BindHttpException: Failed to bind to [9200]  
at org.elasticsearch.http.netty4.Netty4HttpServerTransport.bindAddress(Netty4HttpServerTransport.java:453) ~[?:?]  
at org.elasticsearch.http.netty4.Netty4HttpServerTransport.createBoundHttpAddress(Netty4HttpServerTransport.java:354) ~[?:?]  
at org.elasticsearch.http.netty4.Netty4HttpServerTransport.doStart(Netty4HttpServerTransport.java:334) ~[?:?]  
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:69) ~[elasticsearch-5.2.1.jar:5.2.1]  
at org.elasticsearch.http.HttpServer.doStart(HttpServer.java:76) ~[elasticsearch-5.2.1.jar:5.2.1]  
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:69) ~[elasticsearch-5.2.1.jar:5.2.1]  
at org.elasticsearch.node.Node.start(Node.java:643) ~[elasticsearch-5.2.1.jar:5.2.1]  
at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:261) ~[elasticsearch-5.2.1.jar:5.2.1]  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:335) ~[elasticsearch-5.2.1.jar:5.2.1]  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.2.1.jar:5.2.1]  
... 6 more  
Caused by: java.net.BindException: Address already in use  
at sun.nio.ch.Net.bind0(Native Method) ~[?:?]  
at sun.nio.ch.Net.bind(Net.java:437) ~[?:?]  
at sun.nio.ch.Net.bind(Net.java:429) ~[?:?]

Configuration is pretty straight forward with defaults except HOST and IP.

Again, somehow it works for 127.0.0.1 only,  
Small update, when I am not setting any port, it takes 9200 9300 and binds REST to 9202 and it works ok. But why cannot I still use 9200?

Thank you

---

<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:** [May 15, 2017, 8:07pm UTC](https://discuss.elastic.co/t/unable-to-start-es2-and-es5-on-specific-machine/85807/2 "2017-05-15T20:07:18Z")

</div>

Probably you already have something running on that port.

Try to check if you have other elasticsearch instances running.

---

<div class="post-metadata">

**Author:** ![grokos](https://avatars.discourse-cdn.com/v4/letter/g/858c86/32.png) [@grokos](https://discuss.elastic.co/u/grokos)\
**Post date:** [May 16, 2017, 2:19pm UTC](https://discuss.elastic.co/t/unable-to-start-es2-and-es5-on-specific-machine/85807/3 "2017-05-16T14:19:19Z")

</div>

Well that is a problem that I have nothing running.  
Did run lsof and port is not taken. Somehow it works on port 9202 and choses it by itself if I leave it by default. But 9200 not working with host name and only with loopback IP. I suspect other clusters may claim it as a node and try to discover it or something like that.

Thank you

Alex Groysman  
Shared Delivery Services (SDS) Tools Team  
+1.972.965.0385 (mobile)  
+1.972.308.3255 (office)

AMDOCS |EMBRACE CHALLENGE EXPERIENCE SUCCESS

---

<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:** [May 16, 2017, 2:22pm UTC](https://discuss.elastic.co/t/unable-to-start-es2-and-es5-on-specific-machine/85807/4 "2017-05-16T14:22:50Z")

</div>

Can you share your Elasticsearch configuration?

---

<div class="post-metadata">

**Author:** ![grokos](https://avatars.discourse-cdn.com/v4/letter/g/858c86/32.png) [@grokos](https://discuss.elastic.co/u/grokos)\
**Post date:** [May 16, 2017, 3:07pm UTC](https://discuss.elastic.co/t/unable-to-start-es2-and-es5-on-specific-machine/85807/5 "2017-05-16T15:07:17Z")

</div>

[cluster.name](http://cluster.name): es5-tools-test  
[node.name](http://node.name): es5-tools-test-1  
path.data: /home/data/  
path.logs: /home/logs  
bootstrap.system\_call\_filter: false  
network.host: zlp11124  
http.port: 9200  
network.publish\_host: zlp11124  
discovery.zen.minimum\_master\_nodes: 1  
http.cors.enabled: true  
http.cors.allow-origin: "\*"

Note, if I use 127.0.0.1 in network.host it works but of course not visible from the network.

Thank you

Alex Groysman  
Shared Delivery Services (SDS) Tools Team  
+1.972.965.0385 (mobile)  
+1.972.308.3255 (office)

AMDOCS |EMBRACE CHALLENGE EXPERIENCE SUCCESS

---

<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:** [June 13, 2017, 3:07pm UTC](https://discuss.elastic.co/t/unable-to-start-es2-and-es5-on-specific-machine/85807/6 "2017-06-13T15:07:38Z")

</div>

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