Sonarqube 安装程序在 MAC 终端中抛出 "Could not create the Java Virtual Machine" 错误
Sonarqube setup throws "Could not create the Java Virtual Machine" error in MAC terminal
嗨,我正在关注下面的 youtube 教程
Youtube tutorial
并且在这一步 Mike:macosx-universal-64 mike$ sh sonar.sh 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.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
我尝试使用此命令 /usr/libexec/java_home -V
并得到以下结果
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
我是新手,正在尝试了解问题的确切原因以及解决方法。
请帮帮我
您需要降低 Java。 Sonarqube 服务器仅支持 Java 11 并使用 UseConcMarkSweepGC
选项,该选项已在以后的 Java 版本中删除。
SonarQube server requires version 11. Versions beyond Java 11 are not officially supported.
嗨,我正在关注下面的 youtube 教程 Youtube tutorial
并且在这一步 Mike:macosx-universal-64 mike$ sh sonar.sh 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.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
我尝试使用此命令 /usr/libexec/java_home -V
并得到以下结果
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
我是新手,正在尝试了解问题的确切原因以及解决方法。
请帮帮我
您需要降低 Java。 Sonarqube 服务器仅支持 Java 11 并使用 UseConcMarkSweepGC
选项,该选项已在以后的 Java 版本中删除。
SonarQube server requires version 11. Versions beyond Java 11 are not officially supported.