StartSonar.bat fails on Windows 10 with "Unrecognized VM option 'UseConcMarkSweepGC'"

Sonar Qube : 8.6.0.39681
Java version 15.0.1

‘’’

startsonar.bat
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM…
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2020.12.22 08:27:49 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Users\payne\Documents\sonarqube\sonarqube-8.6.0.39681\temp
jvm 1 | 2020.12.22 08:27:49 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:49720]
jvm 1 | 2020.12.22 08:27:49 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [C:\Users\payne\Documents\sonarqube\sonarqube-8.6.0.39681\elasticsearch]: C:\Program Files\Java\jdk-15.0.1\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.io.tmpdir=C:\Users\payne\Documents\sonarqube\sonarqube-8.6.0.39681\temp -XX:ErrorFile=…/logs/es_hs_err_pid%p.log -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dio.netty.allocator.numDirectArenas=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.locale.providers=COMPAT -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\Users\payne\Documents\sonarqube\sonarqube-8.6.0.39681\elasticsearch -Des.path.conf=C:\Users\payne\Documents\sonarqube\sonarqube-8.6.0.39681\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
jvm 1 | 2020.12.22 08:27:49 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | Unrecognized VM option ‘UseConcMarkSweepGC’
jvm 1 | Error: Could not create the Java Virtual Machine.
jvm 1 | Error: A fatal exception has occurred. Program will exit.
jvm 1 | 2020.12.22 08:27:49 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
jvm 1 | 2020.12.22 08:27:49 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1 | 2020.12.22 08:27:49 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1 | 2020.12.22 08:27:50 ERROR app[o.s.a.p.EsManagedProcess] Failed to check status
jvm 1 | java.lang.RuntimeException: thread waiting for the response was interrupted
jvm 1 | at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:818)
jvm 1 | at org.elasticsearch.client.RestClient.performRequest(RestClient.java:259)
jvm 1 | at org.elasticsearch.client.RestClient.performRequest(RestClient.java:246)
jvm 1 | at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1613)
jvm 1 | at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1583)
jvm 1 | at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1553)
jvm 1 | at org.elasticsearch.client.ClusterClient.health(ClusterClient.java:130)
jvm 1 | at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:56)
jvm 1 | at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:89)
jvm 1 | at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:74)
jvm 1 | at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:59)
jvm 1 | at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:220)
jvm 1 | at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:285)
jvm 1 | Caused by: java.lang.InterruptedException: null
jvm 1 | at java.base/java.lang.Object.wait(Native Method)
jvm 1 | at java.base/java.lang.Object.wait(Object.java:321)
jvm 1 | at org.apache.http.concurrent.BasicFuture.get(BasicFuture.java:82)
jvm 1 | at org.apache.http.impl.nio.client.FutureWrapper.get(FutureWrapper.java:70)
jvm 1 | at org.elasticsearch.client.RestClient.performRequest(RestClient.java:255)
jvm 1 | … 11 common frames omitted
wrapper | <-- Wrapper Stopped
‘’’

Found answer here:Trying sonarqube for the first time

Need to run the Java 11 and not Java 15.

1 Like

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