# Ports for Java client?

**URL:** https://discuss.elastic.co/t/ports-for-java-client/6358
**Category:** Elasticsearch
**Created:** [January 12, 2012, 2:06am UTC](https://discuss.elastic.co/t/ports-for-java-client/6358 "2012-01-12T02:06:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Frank\_LaRosa](https://avatars.discourse-cdn.com/v4/letter/f/bc8723/32.png) [@Frank\_LaRosa](https://discuss.elastic.co/u/Frank_LaRosa)
#### Post date: [January 12, 2012, 2:06am UTC](https://discuss.elastic.co/t/ports-for-java-client/6358/1 "2012-01-12T02:06:46Z")

</div>

Hi,

I'm confused about which port the server listens on. When I test it  
from the command line via curl, I use port 9200. But in the Java  
examples, the Java client seems to be connecting on port 9300. There  
are also references to port 9400 in the config file.

I need to know which port or ports are required to connect from the  
Java client so I can configure my firewall correctly.

Thanks.

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [January 12, 2012, 10:48am UTC](https://discuss.elastic.co/t/ports-for-java-client/6358/2 "2012-01-12T10:48:23Z")

</div>

9200 is HTTP port, 9300 is the transport port which nodes talk to one  
another and Java clients do. The 9400 port is only applicable for Thrift if  
you installed the thrift plugin.

On Thu, Jan 12, 2012 at 4:06 AM, Frank LaRosa [frank@studyblue.com](mailto:frank@studyblue.com) wrote:

> Hi,
> 
> I'm confused about which port the server listens on. When I test it  
> from the command line via curl, I use port 9200. But in the Java  
> examples, the Java client seems to be connecting on port 9300. There  
> are also references to port 9400 in the config file.
> 
> I need to know which port or ports are required to connect from the  
> Java client so I can configure my firewall correctly.
> 
> Thanks.

---

<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: [July 6, 2017, 3:42am UTC](https://discuss.elastic.co/t/ports-for-java-client/6358/3 "2017-07-06T03:42:56Z")

</div>


