# ElasticSearch PORT 9300 connection refused

**URL:** <https://discuss.elastic.co/t/elasticsearch-port-9300-connection-refused/77391>\
**Category:** Elasticsearch\
**Created:** [March 4, 2017, 5:11pm UTC](https://discuss.elastic.co/t/elasticsearch-port-9300-connection-refused/77391 "2017-03-04T17:11:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohan\_Ghimire](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@Mohan\_Ghimire](https://discuss.elastic.co/u/Mohan_Ghimire)\
**Post date:** [March 4, 2017, 5:11pm UTC](https://discuss.elastic.co/t/elasticsearch-port-9300-connection-refused/77391/1 "2017-03-04T17:11:27Z")

</div>

I've deployed Elasticsearch 5.1.2 in docker version 1.12.6. When i run telnet to 9200 and 9300 port of the server using localhost then it says the connection is successful. But when i run telnet to 9300 port of the server using the server address it says connection refused.

I've also tried to execute some search request from my JAVA application to Elasticsearch using the server HOST name and the PORT 9300 then I get the following error:

```
loaded plugin [org.elasticsearch.index.reindex.ReindexPlugin]

loaded plugin [org.elasticsearch.percolator.PercolatorPlugin]

loaded plugin [org.elasticsearch.script.mustache.MustachePlugin]

loaded plugin [org.elasticsearch.transport.Netty3Plugin]

loaded plugin [org.elasticsearch.transport.Netty4Plugin]

failed to connect to node [{#transport#-1}{JElPum7oR5Szj0KG45ULww}{elasticsearch}{< **serverIP** >:9300}], removed from nodes list

org.elasticsearch.transport.ConnectTransportException: [][< **serverIP** >:9300] connect_timeout[30s]

at org.elasticsearch.transport.netty4.Netty4Transport.connectToChannelsLight(Netty4Transport.java:340) ~[transport-netty4-client-5.1.2.jar:5.1.2]

at org.elasticsearch.transport.TcpTransport.connectToNode(TcpTransport.java:410) ~[elasticsearch-5.1.2.jar:5.1.2]

at org.elasticsearch.transport.TcpTransport.connectToNodeLight(TcpTransport.java:382) ~[elasticsearch-5.1.2.jar:5.1.2]

at org.elasticsearch.transport.TransportService.connectToNodeLight(TransportService.java:303) ~[elasticsearch-5.1.2.jar:5.1.2]

at org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler.doSample(TransportClientNodesService.java:392) [elasticsearch-5.1.2.jar:5.1.2]

at org.elasticsearch.client.transport.TransportClientNodesService$NodeSampler.sample(TransportClientNodesService.java:338) [elasticsearch-5.1.2.jar:5.1.2]

at org.elasticsearch.client.transport.TransportClientNodesService.addTransportAddresses(TransportClientNodesService.java:179) [elasticsearch-5.1.2.jar:5.1.2]

at org.elasticsearch.client.transport.TransportClient.addTransportAddress(TransportClient.java:301) [elasticsearch-5.1.2.jar:5.1.2]

at com.goglides.esservice.clientservice.ClientService.createClient(ClientService.java:36) [classes/:?]

at com.goglides.esservice.clientservice.ClientService.getClient(ClientService.java:23) [classes/:?]

at com.goglides.esservice.util.SearchQueryExecutor.getSearchRequestBuilder(SearchQueryExecutor.java:50) [classes/:?]

at com.goglides.esservice.util.SearchQueryExecutor.execute(SearchQueryExecutor.java:27) [classes/:?]

at com.goglides.esservice.ESService.searchGlides(ESService.java:37) [classes/:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]

at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]

at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) [jersey-server-1.19.jar:1.19]

at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) [jersey-server-1.19.jar:1.19]

at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) [jersey-server-1.19.jar:1.19]

at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) [jersey-server-1.19.jar:1.19]

at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.19.jar:1.19]

at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) [jersey-server-1.19.jar:1.19]

at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.19.jar:1.19]

```

My configuration in elasticsearch.yml is:-

```
http.host: 0.0.0.0
cluster.name: goglides_cluster
node.name: dev-node
http.cors.enabled: true
http.cors.allow-origin: "*"

```

Please let me know what I'm missing.

---

<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:** [April 1, 2017, 5:12pm UTC](https://discuss.elastic.co/t/elasticsearch-port-9300-connection-refused/77391/2 "2017-04-01T17:12:32Z")

</div>

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