sonarqube安装程序在mac终端中抛出“无法创建java虚拟机”错误

kyvafyod  于 2021-07-09  发布在  Java
关注(0)|答案(1)|浏览(897)

嗨,我下面是youtube教程youtube教程
在这一步 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

我是新来的,并试图了解究竟是什么问题,以及如何解决这个问题。
请帮帮我

bq9c1y66

bq9c1y661#

你需要降低你的java。sonarqube服务器仅支持Java11并使用 UseConcMarkSweepGC 在以后的java版本中删除的选项。
sonarqube服务器需要版本11。官方不支持Java11以外的版本。

相关问题