# Elasticsearchversion 7.17.9 is not starting - Exception in thread "main" java.lang.RuntimeException: starting java

**URL:** <https://discuss.elastic.co/t/elasticsearchversion-7-17-9-is-not-starting-exception-in-thread-main-java-lang-runtimeexception-starting-java/330658>\
**Category:** Elasticsearch\
**Created:** [April 24, 2023, 1:40pm UTC](https://discuss.elastic.co/t/elasticsearchversion-7-17-9-is-not-starting-exception-in-thread-main-java-lang-runtimeexception-starting-java/330658 "2023-04-24T13:40:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirankumarb](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@kirankumarb](https://discuss.elastic.co/u/kirankumarb)\
**Post date:** [April 24, 2023, 1:40pm UTC](https://discuss.elastic.co/t/elasticsearchversion-7-17-9-is-not-starting-exception-in-thread-main-java-lang-runtimeexception-starting-java/330658/1 "2023-04-24T13:40:35Z")

</div>

Elasticsearch 7.8 is upgraded to version 7.17.9, then unable to start the service.  
And in logs getting following Error: Exception in thread "main" java.lang.RuntimeException: starting java.

---

<div class="post-metadata">

**Author:** ![kirankumarb](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@kirankumarb](https://discuss.elastic.co/u/kirankumarb)\
**Post date:** [April 24, 2023, 1:43pm UTC](https://discuss.elastic.co/t/elasticsearchversion-7-17-9-is-not-starting-exception-in-thread-main-java-lang-runtimeexception-starting-java/330658/2 "2023-04-24T13:43:50Z")

</div>

Java - version :  
openjdk version "1.8.0\_362"  
OpenJDK Runtime Environment Corretto-8.362.08.1 (build 1.8.0\_362-b08)  
OpenJDK 64-Bit Server VM Corretto-8.362.08.1 (build 25.362-b08, mixed mode)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 24, 2023, 1:46pm UTC](https://discuss.elastic.co/t/elasticsearchversion-7-17-9-is-not-starting-exception-in-thread-main-java-lang-runtimeexception-starting-java/330658/3 "2023-04-24T13:46:25Z")

</div>

Hi @kirankumarb

What installation method?

Did you run?

`sudo /bin/systemctl daemon-reload`

Please show the whole startup log not just one line, perhaps we can help

---

<div class="post-metadata">

**Author:** ![kirankumarb](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@kirankumarb](https://discuss.elastic.co/u/kirankumarb)\
**Post date:** [April 24, 2023, 1:59pm UTC](https://discuss.elastic.co/t/elasticsearchversion-7-17-9-is-not-starting-exception-in-thread-main-java-lang-runtimeexception-starting-java/330658/4 "2023-04-24T13:59:42Z")

</div>

Hi @stephenb

- We have used this command to update to 7.17.9 :  
**sudo yum upgrade elasticsearch -y**
- No we have not run the **sudo /bin/systemctl daemon-reload** command  
-Logs:

```auto
Apr 24 10:03:55 systemd[1]: Started Elasticsearch.
Apr 24 10:03:57 elasticsearch[11406]: Exception in thread "main" java.lang.RuntimeException: starting java
Apr 24 10:03:57 elasticsearch[11406]: output:
Apr 24 10:03:57 elasticsearch[11406]: error:
Apr 24 10:03:57 elasticsearch[11406]: Unrecognized VM option 'UseConcMarkSweepGC'
Apr 24 10:03:57 elasticsearch[11406]: Error: Could not create the Java Virtual Machine.
Apr 24 10:03:57 elasticsearch[11406]: Error: A fatal exception has occurred. Program will exit.
Apr 24 10:03:57 elasticsearch[11406]: at org.elasticsearch.tools.launchers.JvmOption.flagsFinal(JvmOption.
Apr 24 10:03:57 elasticsearch[11406]: at org.elasticsearch.tools.launchers.JvmOption.findFinalOptions(JvmO
Apr 24 10:03:57 elasticsearch[11406]: at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonom
Apr 24 10:03:57 elasticsearch[11406]: at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(Jvm
Apr 24 10:03:57 elasticsearch[11406]: at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOption
Apr 24 10:03:57 systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Apr 24 10:03:57 systemd[1]: Unit elasticsearch.service entered failed state.
Apr 24 10:03:57 systemd[1]: elasticsearch.service failed.

```

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 24, 2023, 2:20pm UTC](https://discuss.elastic.co/t/elasticsearchversion-7-17-9-is-not-starting-exception-in-thread-main-java-lang-runtimeexception-starting-java/330658/5 "2023-04-24T14:20:40Z")

</div>

> [@kirankumarb](#):
>
> ` Unrecognized VM option 'UseConcMarkSweepGC'`

Are you sure you are not running the bundled JDK with an

```auto
openjdk 19.0.2 2023-01-17
OpenJDK Runtime Environment (build 19.0.2+7-44)
OpenJDK 64-Bit Server VM (build 19.0.2+7-44, mixed mode, sharing)

```

Perhaps you have old jvm.options file or bad setting looks like perhaps it did not get updated.

Seems like you are running into the below read the comments in the GC Section

```auto
$ cat jvm.options
################################################################
##
## JVM configuration
##
################################################################
##
## WARNING: DO NOT EDIT THIS FILE. If you want to override the
## JVM options in this file, or set any additional options, you
## should create one or more files in the jvm.options.d
## directory containing your adjustments.
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/jvm-options.html
## for more information.
##
################################################################

....

################################################################
## Expert settings
################################################################
##
## All settings below here are considered expert settings. Do
## not adjust them unless you understand what you are doing. Do
## not edit them in this file; instead, create a new file in the
## jvm.options.d directory containing your adjustments.
##
################################################################

## GC configuration
8-13:-XX:+UseConcMarkSweepGC
8-13:-XX:CMSInitiatingOccupancyFraction=75
8-13:-XX:+UseCMSInitiatingOccupancyOnly

## G1GC Configuration. <!----- HERE 
# NOTE: G1 GC is only supported on JDK version 10 or later
# to use G1GC, uncomment the next two lines and update the version on the
# following three lines to your version of the JDK
# 10-13:-XX:-UseConcMarkSweepGC
# 10-13:-XX:-UseCMSInitiatingOccupancyOnly
14-:-XX:+UseG1GC
...

```

---

<div class="post-metadata">

**Author:** ![kirankumarb](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@kirankumarb](https://discuss.elastic.co/u/kirankumarb)\
**Post date:** [April 25, 2023, 5:48am UTC](https://discuss.elastic.co/t/elasticsearchversion-7-17-9-is-not-starting-exception-in-thread-main-java-lang-runtimeexception-starting-java/330658/6 "2023-04-25T05:48:42Z")

</div>

-Yes, I'm now able to start the service after adding 8-13 in GC Configuration. Thank you for the solution

---

<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:** [May 23, 2023, 5:49am UTC](https://discuss.elastic.co/t/elasticsearchversion-7-17-9-is-not-starting-exception-in-thread-main-java-lang-runtimeexception-starting-java/330658/7 "2023-05-23T05:49:19Z")

</div>

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