# UseConcMarkSweepGC error - cannot start ElasticSearch

**URL:** <https://discuss.elastic.co/t/useconcmarksweepgc-error-cannot-start-elasticsearch/288616>\
**Category:** Elasticsearch\
**Created:** [November 8, 2021, 10:42am UTC](https://discuss.elastic.co/t/useconcmarksweepgc-error-cannot-start-elasticsearch/288616 "2021-11-08T10:42:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TVRV8S](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@TVRV8S](https://discuss.elastic.co/u/TVRV8S)\
**Post date:** [November 8, 2021, 10:42am UTC](https://discuss.elastic.co/t/useconcmarksweepgc-error-cannot-start-elasticsearch/288616/1 "2021-11-08T10:42:00Z")

</div>

I posted a question on Stack Overflow but perhaps it's better here.

[https://stackoverflow.com/questions/69875937/elasticsearch-windows-2016-hosted-server-useconcmarksweepgc-error](https://stackoverflow.com/questions/69875937/elasticsearch-windows-2016-hosted-server-useconcmarksweepgc-error)

I downloaded the Elasticsearch ZIP and extracted it to

**c:\elastic\Elasticsearch-7.14.0**

Each time I try to run **Elasticsearch.bat** , I get the error:

```auto
Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
output:

error:
Unrecognized VM option 'UseConcMarkSweepGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
        at org.elasticsearch.tools.launchers.JvmOption.flagsFinal(JvmOption.java:119)
        at org.elasticsearch.tools.launchers.JvmOption.findFinalOptions(JvmOption.java:81)
        at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:38)
        at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:135)
        at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:86)

```

**C:\elastic\Elasticsearch\Elasticsearch-7.14.0\config\jvm.options**

has these lines:

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

## G1GC Configuration
# 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

```

The two suggestions I've managed to find are:

1. To override the jvm.options file by putting a copy into this folder:

**C:\elastic\Elasticsearch\Elasticsearch-7.14.0\config\jvm.options.d**

1. Comment out the following lines in both files:-XX:+UseConcMarkSweepGC-XX:CMSInitiatingOccupancyFraction=75-XX:+UseCMSInitiatingOccupancyOnly

If I do this, I get the same error as though Elasticsearch is ignoring the jvm.options files.

I don't know much about Java. According to this file:

**C:\elastic\Elasticsearch\Elasticsearch-7.14.0\jdk\release**

the Java version is:

```auto
JAVA_VERSION="16.0.1"

```

That said, I followed the comments in the options file and also tried setting these lines to:

```auto
## G1GC Configuration
# 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
16-:-XX:+UseG1GC

```

Still no joy.

Can someone please help me?

---

<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:** [December 6, 2021, 10:42am UTC](https://discuss.elastic.co/t/useconcmarksweepgc-error-cannot-start-elasticsearch/288616/2 "2021-12-06T10:42:52Z")

</div>

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