# Java HeapDumpOnOutOfMemoryError on 9300 port

**URL:** <https://discuss.elastic.co/t/java-heapdumponoutofmemoryerror-on-9300-port/91133>\
**Category:** Elasticsearch\
**Created:** [June 28, 2017, 3:09pm UTC](https://discuss.elastic.co/t/java-heapdumponoutofmemoryerror-on-9300-port/91133 "2017-06-28T15:09:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vito\_Lipari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vito_lipari/32/19478_2.png) [@Vito\_Lipari](https://discuss.elastic.co/u/Vito_Lipari)\
**Post date:** [June 28, 2017, 3:09pm UTC](https://discuss.elastic.co/t/java-heapdumponoutofmemoryerror-on-9300-port/91133/1 "2017-06-28T15:09:53Z")

</div>

hi to everybody,  
i'm writing a little application in java ( Spring Boot ), but java cannot connect on 9300 port.

i check the 9300 port in many ways...  
when i launch this comand  
`sudo netstat -lanpt | grep LIST | grep java`

i have this response  
`tcp6 0 0 :::9300 :::* LISTEN 3775/java`

and if i launch this command  
`sudo ps -auwwx | grep 3775`

i have this  
`elastic+ 3775 0.5 20.6 5825740 2491480 ? Ssl 11:35 1:46 /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xms2g -Xmx2g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -XX:+HeapDumpOnOutOfMemoryError -Des.path.home=/usr/share/elasticsearch -cp /usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch -p /var/run/elasticsearch/elasticsearch.pid --quiet -Edefault.path.logs=/var/log/elasticsearch -Edefault.path.data=/var/lib/elasticsearch -Edefault.path.conf=/etc/elasticsearch`

is there a way to solve **HeapDumpOnOutOfMemoryError**??

---

<div class="post-metadata">

**Author:** ![pickypg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pickypg/32/62409_2.png) [@pickypg](https://discuss.elastic.co/u/pickypg)\
**Post date:** [June 28, 2017, 4:19pm UTC](https://discuss.elastic.co/t/java-heapdumponoutofmemoryerror-on-9300-port/91133/2 "2017-06-28T16:19:26Z")

</div>

Hi @Vito_Lipari,

I'm not quite sure what you are asking. Elasticsearch's transport port and `-XX:+HeapDumpOnOutOfMemoryError` are not related topics.

The `-XX:+HeapDumpOnOutOfMemoryError` setting tells the JVM that it should create a heap dump if it runs into any `OutOfMemoryError` errors.

The transport port that Elasticsearch does indeed default to using. However, Elasticsearch, since 2.0, has [defaulted to only binding its sockets to the loopback address (e.g., `localhost`)](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html), which means you cannot access the port from outside of the machine unless you modify the network settings.

From the process flags that you showed, it appears that you are running the RPM/DEB installation of Elasticsearch, but it's impossible to know what is being set via the configuration. Can you check the network settings and let us know?

Thanks,  
Chris

---

<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 26, 2017, 4:19pm UTC](https://discuss.elastic.co/t/java-heapdumponoutofmemoryerror-on-9300-port/91133/3 "2017-07-26T16:19:37Z")

</div>

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