Unable to Start SonarQube on Mac OS Big Sur

Hi All,
I was trying to install SonarQube on my mac using brew. I am new to SonarQube so pls be patient with me. Here are the brew commands I used to install the SonarQube and Sonar Scanner.

brew install sonar
brew install sonar-scanner

Looks like in installed version 8.6 of SonarQube under /usr/local/Cellar/sonarqube/8.6.0.39681 and version 4.5 of sonar-scanner under /usr/local/Cellar/sonar-scanner/4.5.0.2216. According to the notes I found at Link after executing the export commands when I execute command “sonar console” I get an error “Could not create the Java Virtual Machine.”. Here is the full text of the console output.

$ sonar console
Running SonarQube…
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 | 2021.01.04 17:12:40 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /usr/local/Cellar/sonarqube/8.6.0.39681/libexec/temp
jvm 1 | 2021.01.04 17:12:40 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:54057]
jvm 1 | 2021.01.04 17:12:40 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [/usr/local/Cellar/sonarqube/8.6.0.39681/libexec/elasticsearch]: /usr/local/Cellar/sonarqube/8.6.0.39681/libexec/elasticsearch/bin/elasticsearch
jvm 1 | 2021.01.04 17:12:41 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 | 2021.01.04 17:12:41 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
jvm 1 | 2021.01.04 17:12:41 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1 | 2021.01.04 17:12:41 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1 | 2021.01.04 17:12:41 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

Any help you can provide would be greatly appreciated.

SKM

Hi, welcome to the community forum!

You can see more logs in /usr/local/Cellar/sonarqube/8.6.0.39681/logs. Please have a look at the troubleshooting guide, you have 4 log files to look for errors. You should look first at web.log and es.log in your case. Any more details on theses files?

1 Like

Thanks @pierreguillot for your response. I resolved the issue by installing and using OpenJDK 11. I was getting errors while using Oracle Java 8 and OpenJDK 15.

1 Like

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