Hi Iam following below youtube tutorial Youtube tutorial
and at this step Mike:macosx-universal-64 mike$ sh sonar.sh console
am getting below error
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.04.22 11:02:40 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /Users/mike/Downloads/sonarqube/temp
jvm 1 | 2021.04.22 11:02:40 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:50435]
jvm 1 | 2021.04.22 11:02:40 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/Users/mike/Downloads/sonarqube/elasticsearch]: /Users/mike/Downloads/sonarqube/elasticsearch/bin/elasticsearch
jvm 1 | 2021.04.22 11:02:40 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
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.04.22 11:02:40 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
jvm 1 | 2021.04.22 11:02:40 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1 | 2021.04.22 11:02:40 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1 | 2021.04.22 11:02: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:848)
jvm 1 | at org.elasticsearch.client.RestClient.performRequest(RestClient.java:283)
jvm 1 | at org.elasticsearch.client.RestClient.performRequest(RestClient.java:270)
jvm 1 | at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1621)
jvm 1 | at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1591)
jvm 1 | at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1561)
jvm 1 | at org.elasticsearch.client.ClusterClient.health(ClusterClient.java:119)
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:320)
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:279)
jvm 1 | ... 11 common frames omitted
wrapper | <-- Wrapper Stopped
i tried with this command /usr/libexec/java_home -V
and got following result
Matching Java Virtual Machines (1):
16, x86_64: "Java SE 16" /Library/Java/JavaVirtualMachines/jdk-16.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk-16.jdk/Contents/Home
I am new to this and trying to understand what exactly the issue and how to resolve this.
Please help me
You need to lower your Java. Sonarqube server only supports Java 11 and uses UseConcMarkSweepGC
option that has been removed in later Java versions.
SonarQube server requires version 11. Versions beyond Java 11 are not officially supported.