我试图安装和配置sonarqube在我的机器上使用它的小poroyect(Ubuntu 18.04.2 LTS)我已经从官方网站下载了zip Sonarqube 7.7社区版并在/opt/中解压缩。我试着按照sonar指南中的方法在路径/opt/sonarqube/bin/linux-x86-64
中执行./sonar.sh console
,但我遇到了日志权限的问题。
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。
2条答案
按热度按时间lyr7nygr1#
不要尝试使用超级用户。只需更改您使用的用户对整个SonarQube文件夹的访问权限。
lndjwyie2#
to resolve this ./SonarQube pid permission denied chack $vi /etc/sudoers file user added or not sonar ALL=(ALL) NOPASSWD: ALL