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