BindTransportException[Failed to bind to [9300-9400]]

Good day
I am using VM to run elastic search 2.3.3
i have changed only following to elasticsearch.yml file

** http.port: 9200**

i have opened the port for inboud and out bound rules.

i have installed the service, when i am running i am getting following error:

BindTransportException[Failed to bind to [9300-9400]]; nested: ChannelException[Failed to bind to: /xx.xx.xx.xx:9400]; nested: BindException[Cannot assign requested address: bind];
at org.elasticsearch.transport.netty.NettyTransport.bindToPort(
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(
at org.elasticsearch.transport.netty.NettyTransport.doStart(
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(
at org.elasticsearch.transport.TransportService.doStart(
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(
at org.elasticsearch.node.Node.start(
at org.elasticsearch.bootstrap.Bootstrap.start(
at org.elasticsearch.bootstrap.Bootstrap.init(
at org.elasticsearch.bootstrap.Elasticsearch.main(
Caused by: Failed to bind to: /
at org.jboss.netty.bootstrap.ServerBootstrap.bind(
at org.elasticsearch.transport.netty.NettyTransport$1.onPortNumber(
at org.elasticsearch.common.transport.PortsRange.iterate(
at org.elasticsearch.transport.netty.NettyTransport.bindToPort(
... 9 more

any help in this regard appreciated.
one more thing: we are running Solr on the same VM

UPDATE : replacing network host value with :
worked for now.. can any one explain the threats or issues for opening it all IPs

1 Like

From the Javadocs:

Signals that an error occurred while attempting to bind a socket to a local address and port. Typically, the port is in use, or the requested local address could not be assigned.

Is it possible that you misconfigured to an IP address that does not exist on any of your network interfaces? Maybe use one of the special values instead of going for an explicit value.

Hi, thanks for reply
No, i have double checked it.. ip is correct and more over Solr search is accessible with the same ip (We have both searches on the same VM.).

The IP address (which is still visible in the stacktrace of your original post) is a public IP and probably not one available on your network interfaces in the VM. To see which ones are available (after you've configured have a look at the bound_addresses that appear in the ES log output.

Hi, below is the log which is showing as publish address..
after changing it to (pls ignore time stamp)

thanks in advance

[2016-11-09 08:18:00,989][INFO ][node ] [Peter Parker] initializing ...
[2016-11-09 08:18:01,692][INFO ][plugins ] [Peter Parker] modules [reindex, lang-expression, lang-groovy], plugins [head, analysis-phonetic], sites [head]
[2016-11-09 08:18:01,723][INFO ][env ] [Peter Parker] using [1] data paths, mounts [[(C:)]], net usable_space [54.7gb], net total_space [126.9gb], spins? [unknown], types [NTFS]
[2016-11-09 08:18:01,723][INFO ][env ] [Peter Parker] heap size [989.8mb], compressed ordinary object pointers [unknown]
[2016-11-09 08:18:03,395][INFO ][node ] [Peter Parker] initialized
[2016-11-09 08:18:03,395][INFO ][node ] [Peter Parker] starting ...
[2016-11-09 08:18:03,551][INFO ][transport ] [Peter Parker] publish_address {}, bound_addresses {[::]:9300}
[2016-11-09 08:18:03,551][INFO ][discovery ] [Peter Parker] sapnet/K-jWzo3VS5C_TYaWWeY_tw
[2016-11-09 08:18:07,598][INFO ][cluster.service ] [Peter Parker] new_master {Peter Parker}{K-jWzo3VS5C_TYaWWeY_tw}{}{}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2016-11-09 08:18:07,707][INFO ][gateway ] [Peter Parker] recovered [0] indices into cluster_state
[2016-11-09 08:18:07,723][INFO ][http ] [Peter Parker] publish_address {}, bound_addresses {[::]:9200}
[2016-11-09 08:18:07,723][INFO ][node ] [Peter Parker] started

So that's your answer then (use If that address is dynamically assigned (e.g. when VM is restarted) you can also use one of the special values which allow you for example to bind to an addresses of a specific network interface, for example en0.

If i use :, i can't access outside the vm, it works when i am browsing inside VM.

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