# Elasticsearch client uses up all ephermeral ports

**URL:** <https://discuss.elastic.co/t/elasticsearch-client-uses-up-all-ephermeral-ports/359510>\
**Category:** Elasticsearch\
**Created:** [May 15, 2024, 6:38am UTC](https://discuss.elastic.co/t/elasticsearch-client-uses-up-all-ephermeral-ports/359510 "2024-05-15T06:38:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kasinaat007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kasinaat007/32/134492_2.png) [@kasinaat007](https://discuss.elastic.co/u/kasinaat007)\
**Post date:** [May 15, 2024, 6:38am UTC](https://discuss.elastic.co/t/elasticsearch-client-uses-up-all-ephermeral-ports/359510/1 "2024-05-15T06:38:21Z")

</div>

After upgrading Azul Zulu JRE to the latest version, ES client uses up all ephemeral ports, other applications are not able to get ports to make outbound connections.

OLD JRE Version : 1.8\_0\_282  
NEW JRE Version : 1.8\_0\_402

Elasticsearch Version : 6.5.4

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 15, 2024, 8:16am UTC](https://discuss.elastic.co/t/elasticsearch-client-uses-up-all-ephermeral-ports/359510/2 "2024-05-15T08:16:33Z")

</div>

If it changed with JVM upgrade it sounds like it could be a JVM issue?

Note that you are using a very old version of Elasticsearch that has been EOL a very long time. It, and related clients, are no longer maintained so my advice would be to upgrade to the latest version. That would require you to also change the client, which I suspect would resolve the issue. I also do not think the JVM you are using was [officially supported](https://www.elastic.co/support/matrix/#matrix_jvm), so switching to a supported JVM might also be an option.

---

<div class="post-metadata">

**Author:** ![kasinaat007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kasinaat007/32/134492_2.png) [@kasinaat007](https://discuss.elastic.co/u/kasinaat007)\
**Post date:** [May 15, 2024, 10:08am UTC](https://discuss.elastic.co/t/elasticsearch-client-uses-up-all-ephermeral-ports/359510/3 "2024-05-15T10:08:53Z")

</div>

Thanks for the suggestions.

I've found that this issue has something to do with TLS 1.3 being enabled by default in the latest releases of Zulu JRE.

The old version I used doesn't have TLS1.3 enabled by default. On enabling it in the older version, the same issue occurs

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 15, 2024, 10:17am UTC](https://discuss.elastic.co/t/elasticsearch-client-uses-up-all-ephermeral-ports/359510/4 "2024-05-15T10:17:35Z")

</div>

I think Elasticsearch 6.5.4 was released around the same time TLSv3 was introduced so it has probably never been tested with it, especially as I think you are using an unsupported JVM. As stated above I would recommend you upgrade to the latest version.
