我正在尝试安装和配置sonarqube以便在我的机器中使用它(Ubuntu 18.04.2 LTS)y已经从官方网站下载了压缩的Sonarqube 7.7社区版并且在/ opt /中解压缩。我试着像声纳指南那样说,并在路径./sonar.sh console
执行/opt/sonarqube/bin/linux-x86-64
,我遇到了日志permisions的问题。
Running SonarQube...
wrapper | ERROR: Could not write pid file /opt/sonarqube/bin/linux-x86-64/./SonarQube.pid: Permission denied
Unable to open logfile ../../logs/sonar.log: Permission denied
所以我尝试和超级用户一样,我得到了
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 | 2019.04.05 19:55:48 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
jvm 1 | 2019.04.05 19:55:48 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2019.04.05 19:55:48 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
jvm 1 | 2019.04.05 19:55:48 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | 2019.04.05 19:55:48 INFO app[][o.e.p.PluginsService] no modules loaded
jvm 1 | 2019.04.05 19:55:48 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
jvm 1 | 2019.04.05 19:55:51 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
jvm 1 | 2019.04.05 19:55:51 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2019.04.05 19:55:51 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1 | 2019.04.05 19:55:51 INFO app[][o.e.c.t.TransportClientNodesService] failed to get node info for {#transport#-1}{pr4ED0vsRgCYZjgn1jbLlQ}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
jvm 1 | java.lang.IllegalStateException: Future got interrupted
jvm 1 | at org.elasticsearch.common.util.concurrent.FutureUtils.get(FutureUtils.java:60)
jvm 1 | at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:34)
jvm 1 | at org.elasticsearch.transport.ConnectionManager.internalOpenConnection(ConnectionManager.java:226)
jvm 1 | at org.elasticsearch.transport.ConnectionManager.openConnection(ConnectionManager.java:85)
jvm 1 | at org.elasticsearch.transport.TransportService.openConnection(TransportService.java:367)
jvm 1 | at org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler.doSample(TransportClientNodesService.java:410)
jvm 1 | at org.elasticsearch.client.transport.TransportClientNodesService$NodeSampler.sample(TransportClientNodesService.java:361)
jvm 1 | at org.elasticsearch.client.transport.TransportClientNodesService.addTransportAddresses(TransportClientNodesService.java:202)
jvm 1 | at org.elasticsearch.client.transport.TransportClient.addTransportAddress(TransportClient.java:342)
jvm 1 | at org.sonar.application.es.EsConnectorImpl$MinimalTransportClient.<init>(EsConnectorImpl.java:108)
jvm 1 | at org.sonar.application.es.EsConnectorImpl.buildTransportClient(EsConnectorImpl.java:89)
jvm 1 | at org.sonar.application.es.EsConnectorImpl.getTransportClient(EsConnectorImpl.java:74)
jvm 1 | at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:61)
jvm 1 | at org.sonar.application.process.EsProcessMonitor.checkStatus(EsProcessMonitor.java:90)
jvm 1 | at org.sonar.application.process.EsProcessMonitor.checkOperational(EsProcessMonitor.java:75)
jvm 1 | at org.sonar.application.process.EsProcessMonitor.isOperational(EsProcessMonitor.java:60)
jvm 1 | at org.sonar.application.process.SQProcess.refreshState(SQProcess.java:161)
jvm 1 | at org.sonar.application.process.SQProcess$EventWatcher.run(SQProcess.java:220)
jvm 1 | Caused by: java.lang.InterruptedException: null
jvm 1 | at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1038)
jvm 1 | at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1343)
jvm 1 | at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:251)
jvm 1 | at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:94)
jvm 1 | at org.elasticsearch.common.util.concurrent.FutureUtils.get(FutureUtils.java:57)
jvm 1 | ... 17 common frames omitted
wrapper | <-- Wrapper Stopped
我不明白我得到的错误以及为什么它没有启动sonarqube。
不要试图使用超级用户。只需为您使用的用户更改完整SonarQube文件夹的访问权限即可。