swift 无法启动SonarQube,终端出错

nzkunb0c  于 2023-06-21  发布在  Swift
关注(0)|答案(1)|浏览(164)

我正在尝试在Mac Pro M1上实现SonarQube
我已经遵循了以下步骤:here
我已经安装了JDK 11。但是得到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    | 
jvm 1    | WARNING - Unable to load the Wrapper's native library because none of the
jvm 1    |           following files:
jvm 1    |             libwrapper-macosx-aarch64-64.dylib
jvm 1    |             libwrapper-macosx-universal-64.dylib
jvm 1    |             libwrapper.dylib
jvm 1    |           could be located on the following java.library.path:
jvm 1    |             /Applications/SonarQube/bin/macosx-universal-64/./lib
jvm 1    |           Please see the documentation for the wrapper.java.library.path
jvm 1    |           configuration property.
jvm 1    |           System signals will not be handled correctly.
jvm 1    | 
jvm 1    | 2022.08.02 16:08:58 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /Applications/SonarQube/temp
jvm 1    | 2022.08.02 16:08:58 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:58182]
jvm 1    | 2022.08.02 16:08:59 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/Applications/SonarQube/elasticsearch]: /Applications/SonarQube/elasticsearch/bin/elasticsearch
jvm 1    | 2022.08.02 16:08:59 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1    | Exception in thread "main" java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
jvm 1    |  at java.base/java.lang.System.setSecurityManager(System.java:416)
jvm 1    |  at org.elasticsearch.bootstrap.Security.setSecurityManager(Security.java:99)
jvm 1    |  at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:70)
jvm 1    | 2022.08.02 16:08:59 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
jvm 1    | 2022.08.02 16:08:59 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
jvm 1    | 2022.08.02 16:08:59 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1    | 2022.08.02 16:08:59 ERROR app[][o.s.a.p.EsManagedProcess] Failed to check status
jvm 1    | org.elasticsearch.ElasticsearchException: java.lang.InterruptedException
jvm 1    |  at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2695)
jvm 1    |  at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:2171)
jvm 1    |  at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:2137)
jvm 1    |  at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:2105)
jvm 1    |  at org.elasticsearch.client.ClusterClient.health(ClusterClient.java:151)
jvm 1    |  at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:64)
jvm 1    |  at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:92)
jvm 1    |  at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:77)
jvm 1    |  at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:62)
jvm 1    |  at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:223)
jvm 1    |  at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:288)
jvm 1    | Caused by: java.lang.InterruptedException: null
jvm 1    |  at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1048)
jvm 1    |  at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:243)
jvm 1    |  at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:75)
jvm 1    |  at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2692)
jvm 1    |  ... 10 common frames omitted
wrapper  | <-- Wrapper Stopped

我已经检查了大量的StackOverflow问题和解决方案,但仍然无法弄清楚。
我真的很感激你的帮助。

mf98qq94

mf98qq941#

我也面临着同样的问题。在我的系统中,最初是Java 1.8.0_371,然后我从这个官方网站安装了最新的JAVA SDK 20。由于JAVA SDK的版本不同,仍然面临相同的问题,因此您需要根据SonarQube文档安装JAVA 11或JAVA 17版本。
为了解决上述问题,我遵循以下步骤
1.安装JDK 17

brew install openjdk@17Install

1.打开你的系统终端shell环境文件//它可能是不同的在您的系统(.zshrc或**.bash**)检查一次为您的系统和相应的设置.

open .zshrc

1.在终端配置文件中添加PATH

export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"

1.再次尝试重新运行SonarQube

sh /Applications/SonarQube/bin/macosx-universal-64/sonar.sh console

相关问题