Sonartqube 10.2 versi start is failing with error JVM option [UseG1GC] was unexpectedly missing

I get following error on startserver.

d:\sonarqube-10.2.0.77647>d:\sonarqube-10.2.0.77647\bin\windows-x86-64\StartSonar.bat
Starting SonarQube...
2023.09.16 21:27:40 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory D:\sonarqube-data\temp
2023.09.16 21:27:40 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:54076]
2023.09.16 21:27:40 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [D:\sonarqube-10.2.0.77647\elasticsearch]: C:\Program Files\Semeru\jdk-17.0.7.7-openj9\bin\java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=D:\sonarqube-10.2.0.77647\elasticsearch -Des.path.conf=D:\sonarqube-data\temp\conf\es -Des.distribution.type=tar -cp D:\sonarqube-10.2.0.77647\elasticsearch\lib\*;D:\sonarqube-10.2.0.77647\elasticsearch\lib\cli-launcher\* org.elasticsearch.launcher.CliToolLauncher
2023.09.16 21:27:40 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Exception in thread "main" java.lang.IllegalStateException: JVM option [UseG1GC] was unexpectedly missing. Elasticsearch requires this option to be present.
        at org.elasticsearch.server.cli.JvmErgonomics.getRequiredOption(JvmErgonomics.java:98)
        at org.elasticsearch.server.cli.JvmErgonomics.usingG1GcWithoutCommandLineOriginOption(JvmErgonomics.java:91)
        at org.elasticsearch.server.cli.JvmErgonomics.tuneG1GCHeapRegion(JvmErgonomics.java:67)
        at org.elasticsearch.server.cli.JvmErgonomics.choose(JvmErgonomics.java:44)
        at org.elasticsearch.server.cli.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:139)
        at org.elasticsearch.server.cli.JvmOptionsParser.determineJvmOptions(JvmOptionsParser.java:91)
        at org.elasticsearch.server.cli.ServerProcess.createProcess(ServerProcess.java:208)
        at org.elasticsearch.server.cli.ServerProcess.start(ServerProcess.java:104)
        at org.elasticsearch.server.cli.ServerProcess.start(ServerProcess.java:88)
        at org.elasticsearch.server.cli.ServerCli.startServer(ServerCli.java:239)
        at org.elasticsearch.server.cli.ServerCli.execute(ServerCli.java:100)
        at org.elasticsearch.common.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:54)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:85)
        at org.elasticsearch.cli.Command.main(Command.java:50)
        at org.elasticsearch.launcher.CliToolLauncher.main(CliToolLauncher.java:64)
2023.09.16 21:27:43 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2023.09.16 21:27:43 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.09.16 21:27:43 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

Hi,

Welcome to the community!

Thanks for this report. Can you share what configurations - beyond setting up your DB connection - you’ve made to SonarQube?

 
Thx,
Ann

Here is my sonar properties file. I have not configured anything else.

sonar.jdbc.username=<username>
sonar.jdbc.password=<userpassword>
sonar.jdbc.url=jdbc:postgresql://<db_url>
sonar.web.host=<server_ip_address>
sonar.web.port=9010
sonar.security.realm=LDAP
sonar.authenticator.downcase=true
ldap.url=<url_to_myldap>
ldap.bindDn=<my_binDN_value>
ldap.bindPassword=<my_bindPassword>
ldap.user.baseDn=<my_base_dn>
ldap.user.request=uid={login}
ldap.user.realNameAttribute=displayname
sonar.path.data=D:/sonarqube-data/data
sonar.path.temp=D:/sonarqube-data/temp

Hi,

Thanks for getting back to me. So to be clear, you’ve made no changes to the bat file used for starting SonarQube?

 
Thx,
Ann

correct.

Hi,

Thanks for confirming. I’ve flagged this for the experts.

 
Ann

any update?

Hello @ass4 ,

We investigated the issue you are having and seems like it is a known problem for the Java distribution you are using, see more details here.

As a workaround, I propose you use another distribution, for example, Zulu.

On our side, we will discuss internally how to approach different Java distributions.

1 Like

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