Unable to start ES2 and ES5 on specific machine


(Alexander Groysman) #1

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


(David Pilato) #2

Probably you already have something running on that port.

Try to check if you have other elasticsearch instances running.


(Alexander Groysman) #3

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


(Christian Dahlqvist) #4

Can you share your Elasticsearch configuration?


(Alexander Groysman) #5

cluster.name: es5-tools-test
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


(system) #6

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