# Elasticsearch 7.8 does not stat Java problem

**URL:** <https://discuss.elastic.co/t/elasticsearch-7-8-does-not-stat-java-problem/245902>\
**Category:** Elasticsearch\
**Created:** [August 21, 2020, 10:11am UTC](https://discuss.elastic.co/t/elasticsearch-7-8-does-not-stat-java-problem/245902 "2020-08-21T10:11:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aurimas](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@aurimas](https://discuss.elastic.co/u/aurimas)\
**Post date:** [August 21, 2020, 10:11am UTC](https://discuss.elastic.co/t/elasticsearch-7-8-does-not-stat-java-problem/245902/1 "2020-08-21T10:11:49Z")

</div>

Hi,  
I am trying to fresh install and launch Elasticsearch 7.8 on RHEL 7.8 but I am getting into some kind of Java problems. I want it to run standalone.  
Tried various ways I found on internet to fix it. But none helped. Any idea whats wrong?

```
journalctl -xe

> systemd[1]: Starting Elasticsearch...
> -- Subject: Unit elasticsearch.service has begun start-up
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> -- 
> -- Unit elasticsearch.service has begun starting up.
> ... systemd-entrypoint[1852]: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
> ... systemd-entrypoint[1852]: output:
> ... systemd-entrypoint[1852]: error:
> ... systemd-entrypoint[1852]: OpenJDK 64-Bit Server VM warning: Ignoring option UseConcMarkSweepGC; support was removed in 14.0
> ... systemd-entrypoint[1852]: OpenJDK 64-Bit Server VM warning: Ignoring option CMSInitiatingOccupancyFraction; support was removed in 14.0
> ... systemd-entrypoint[1852]: OpenJDK 64-Bit Server VM warning: Ignoring option UseCMSInitiatingOccupancyOnly; support was removed in 14.0
> ... systemd-entrypoint[1852]: Unrecognized VM option 'PrintGCDateStamps'
> ... systemd-entrypoint[1852]: Error: Could not create the Java Virtual Machine.
> ... systemd-entrypoint[1852]: Error: A fatal exception has occurred. Program will exit.
> ... systemd-entrypoint[1852]: at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:126)
> ... systemd-entrypoint[1852]: at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:88)
> ... systemd-entrypoint[1852]: at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:59)
> ... systemd-entrypoint[1852]: at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:137)
> ... systemd-entrypoint[1852]: at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:95)
> ... systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
> ... systemd[1]: Failed to start Elasticsearch.
> -- Subject: Unit elasticsearch.service has failed
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> -- 
> -- Unit elasticsearch.service has failed.
> -- 
> -- The result is failed.

##### Configuration:
#### jvm.options

-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
-Dlog4j.shutdownHookEnabled=false
-Dlog4j2.disable.jmx=true
-Dlog4j.skipJansi=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintTenuringDistribution
-XX:+PrintGCApplicationStoppedTime
-Xloggc:/var/log/elasticsearch/gc.log
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=8
-XX:GCLogFileSize=64m

#### /etc/sysconfig/elasticsearch

#ES_HOME=/usr/share/elasticsearch
#CONF_DIR=/etc/elasticsearch
DATA_DIR=/var/lib/elasticsearch
LOG_DIR=/var/log/elasticsearch
#PID_DIR=/var/run/elasticsearch
ES_JAVA_OPTS="-Xms31g -Xmx31g"
#ES_HEAP_NEWSIZE=
#ES_DIRECT_SIZE=
#ES_JAVA_OPTS=
#ES_RESTART_ON_UPGRADE=true
ES_GC_LOG_FILE=/var/log/elasticsearch/gc.log
#ES_USER=elasticsearch
#ES_GROUP=elasticsearch
ES_STARTUP_SLEEP_TIME=5
MAX_OPEN_FILES=262140
#MAX_LOCKED_MEMORY=unlimited
#MAX_MAP_COUNT=262144

#### yum list installed | grep java
java-1.8.0-openjdk.x86_64 1:1.8.0.252.b09-2.el7_8     
java-1.8.0-openjdk-headless.x86_64 1:1.8.0.252.b09-2.el7_8
javapackages-tools.noarch 3.4.1-11.el7
```

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [August 21, 2020, 10:56am UTC](https://discuss.elastic.co/t/elasticsearch-7-8-does-not-stat-java-problem/245902/2 "2020-08-21T10:56:22Z")

</div>

Seems the 'Unrecognized VM option 'PrintGCDateStamps'' is the key - find a way to not set that I guess. Seems odd the new install would include that unless you are getting the wrong version of Java, but seems to be using the V14 JVM.

---

<div class="post-metadata">

**Author:** ![aurimas](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@aurimas](https://discuss.elastic.co/u/aurimas)\
**Post date:** [August 27, 2020, 12:18pm UTC](https://discuss.elastic.co/t/elasticsearch-7-8-does-not-stat-java-problem/245902/3 "2020-08-27T12:18:49Z")

</div>

Yes, I have copied config from older server at some point, and it seems that some of parameters are now comparable. I have fixed the problem by throwing away parameters one by one from jvm.options file:

-Xms2g  
-Xmx2g  
-Djava.io.tmpdir=/data/elk/tmp  
-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  
-Dlog4j.shutdownHookEnabled=false  
-Dlog4j2.disable.jmx=true  
-Dlog4j.skipJansi=true  
-XX:+HeapDumpOnOutOfMemoryError  
-XX:+PrintGCDetails  
#-XX:+PrintGCDateStamps  
#-XX:+PrintTenuringDistribution  
#-XX:+PrintGCApplicationStoppedTime  
-Xloggc:/var/log/elasticsearch/gc.log  
#-XX:+UseGCLogFileRotation  
#-XX:NumberOfGCLogFiles=8  
#-XX:GCLogFileSize=64m

---

<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:** [September 24, 2020, 12:18pm UTC](https://discuss.elastic.co/t/elasticsearch-7-8-does-not-stat-java-problem/245902/4 "2020-09-24T12:18:50Z")

</div>

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