Java HeapDumpOnOutOfMemoryError on 9300 port

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 -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/ --quiet -Edefault.path.logs=/var/log/elasticsearch -Edefault.path.conf=/etc/elasticsearch

is there a way to solve HeapDumpOnOutOfMemoryError ??

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), 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?


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