为了学习,我需要在ubuntu服务器上安装sonarqube。
我按照以下教程安装了它:http://www.naturalborncoder.com/methodology/2015/05/27/sonarqube-on-ubuntu-14-04/(我在代理部分之前就停止了),但我无法访问127.0.0.1:9000。从日志上看,当我发射Sonarcube时,似乎elasticsearch出现了问题。
/opt/sonar/log/sonar.log:
null
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2017.11.14 18:21:11 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonar/temp
2017.11.14 18:21:11 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2017.11.14 18:21:11 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonar/elasticsearch]: /opt/sonar/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonar/temp/conf/es
2017.11.14 18:21:11 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2017.11.14 18:21:13 INFO app[][o.e.p.PluginsService] no modules loaded
2017.11.14 18:21:13 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
java.security.policy: error adding Entry:
java.net.MalformedURLException: no protocol: ${codebase.elasticsearch-rest-client}
java.security.policy: error adding Entry:
java.net.MalformedURLException: no protocol: ${codebase.httpasyncclient-4.1.2.jar}
java.security.policy: error adding Entry:
java.net.MalformedURLException: no protocol: ${codebase.netty-common-4.1.13.Final.jar}
java.security.policy: error adding Entry:
java.net.MalformedURLException: no protocol: ${codebase.netty-transport-4.1.13.Final.jar}
java.security.policy: error adding Entry:
java.net.MalformedURLException: no protocol: ${codebase.securesm-1.1.jar}
java.security.policy: error adding Entry:
java.net.MalformedURLException: no protocol: ${codebase.lucene-core-6.6.1.jar}
java.security.policy: error adding Entry:
java.net.MalformedURLException: no protocol: ${codebase.lucene-misc-6.6.1.jar}
2017.11.14 18:21:27 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
2017.11.14 18:21:27 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2017.11.14 18:21:27 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped
null
/opt/sonar/logs/es.log:
null
2017.11.14 18:21:24 INFO es[][o.e.n.Node] initializing ...
2017.11.14 18:21:24 INFO es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (/dev/vda1)]], net usable_space [5.7gb], net total_space [9.6gb], spins? [possibly], types [ext4]
2017.11.14 18:21:24 INFO es[][o.e.e.NodeEnvironment] heap size [503.6mb], compressed ordinary object pointers [true]
2017.11.14 18:21:24 INFO es[][o.e.n.Node] node name [sonarqube], node ID [3PxDbRbDQ4-M_YDsv25FHg]
2017.11.14 18:21:24 INFO es[][o.e.n.Node] version[5.6.3], pid[8661], build[1a2f265/2017-10-06T20:33:39.012Z], OS[Linux/4.4.0-22-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/9-internal/9-internal+0-2016-04-14-195246.b$
2017.11.14 18:21:24 INFO es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, $
2017.11.14 18:21:26 INFO es[][o.e.p.PluginsService] loaded module [aggs-matrix-stats]
2017.11.14 18:21:26 INFO es[][o.e.p.PluginsService] loaded module [ingest-common]
2017.11.14 18:21:26 INFO es[][o.e.p.PluginsService] loaded module [parent-join]
2017.11.14 18:21:26 INFO es[][o.e.p.PluginsService] loaded module [percolator]
2017.11.14 18:21:26 INFO es[][o.e.p.PluginsService] loaded module [reindex]
2017.11.14 18:21:26 INFO es[][o.e.p.PluginsService] loaded module [transport-netty4]
2017.11.14 18:21:26 INFO es[][o.e.p.PluginsService] no plugins loaded
2017.11.14 18:21:27 ERROR es[][o.e.b.ElasticsearchUncaughtExceptionHandler] fatal error in thread [main], exiting
java.lang.ExceptionInInitializerError: null
at org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter$Builder.build(StemmerOverrideFilter.java:205) ~[lucene-analyzers-common-6.6.1.jar:6.6.1 9aa465a89b64ff2dabe7b4d50c472de32c298683 - varunthacker - 2017-08-29 21:55$
at org.apache.lucene.analysis.nl.DutchAnalyzer.<init>(DutchAnalyzer.java:133) ~[lucene-analyzers-common-6.6.1.jar:6.6.1 9aa465a89b64ff2dabe7b4d50c472de32c298683 - varunthacker - 2017-08-29 21:55:17]
at org.apache.lucene.analysis.nl.DutchAnalyzer.<init>(DutchAnalyzer.java:106) ~[lucene-analyzers-common-6.6.1.jar:6.6.1 9aa465a89b64ff2dabe7b4d50c472de32c298683 - varunthacker - 2017-08-29 21:55:17]
at org.elasticsearch.indices.analysis.PreBuiltAnalyzers$20.create(PreBuiltAnalyzers.java:246) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.indices.analysis.PreBuiltAnalyzers.getAnalyzer(PreBuiltAnalyzers.java:487) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.index.analysis.AnalysisRegistry$PrebuiltAnalysis.<init>(AnalysisRegistry.java:407) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.index.analysis.AnalysisRegistry$PrebuiltAnalysis.<init>(AnalysisRegistry.java:392) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.index.analysis.AnalysisRegistry.<init>(AnalysisRegistry.java:62) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.indices.analysis.AnalysisModule.<init>(AnalysisModule.java:177) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.node.Node.<init>(Node.java:340) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.node.Node.<init>(Node.java:245) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:233) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:233) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.6.3.jar:5.6.3]
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:468) ~[?:?]
at java.security.AccessController.checkPermission(AccessController.java:894) ~[?:?]
at java.lang.SecurityManager.checkPermission(SecurityManager.java:541) ~[?:?]
at java.lang.Class.checkMemberAccess(Class.java:2584) ~[?:?]
at java.lang.Class.getDeclaredFields(Class.java:2092) ~[?:?]
at org.apache.lucene.util.RamUsageEstimator$1.run(RamUsageEstimator.java:339) ~[lucene-core-6.6.1.jar:6.6.1 9aa465a89b64ff2dabe7b4d50c472de32c298683 - varunthacker - 2017-08-29 21:54:39]
at org.apache.lucene.util.RamUsageEstimator$1.run(RamUsageEstimator.java:336) ~[lucene-core-6.6.1.jar:6.6.1 9aa465a89b64ff2dabe7b4d50c472de32c298683 - varunthacker - 2017-08-29 21:54:39]
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at org.apache.lucene.util.RamUsageEstimator.shallowSizeOfInstance(RamUsageEstimator.java:336) ~[lucene-core-6.6.1.jar:6.6.1 9aa465a89b64ff2dabe7b4d50c472de32c298683 - varunthacker - 2017-08-29 21:54:39]
at org.apache.lucene.util.RamUsageEstimator.shallowSizeOf(RamUsageEstimator.java:313) ~[lucene-core-6.6.1.jar:6.6.1 9aa465a89b64ff2dabe7b4d50c472de32c298683 - varunthacker - 2017-08-29 21:54:39]
at org.apache.lucene.util.fst.ByteSequenceOutputs.<clinit>(ByteSequenceOutputs.java:154) ~[lucene-core-6.6.1.jar:6.6.1 9aa465a89b64ff2dabe7b4d50c472de32c298683 - varunthacker - 2017-08-29 21:54:39]
... 21 more
null
Java-版本:
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
sonarqube版本:6.7
我以root身份启动sonarqube,这样就不会有访问权限问题了。
我找到的关于这个错误的所有帖子都与openjdk9相关,但这不是我的情况。
你知道正在发生什么吗?
在我的案例中,Java版本是问题所在。
我安装了Oracle JDK 8 for for sonarcube 6.7.1,它解决了这个问题:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
您可以在这里阅读更多关于支持的平台的信息。就目前而言,仅支持Java 8号。
Sonarqube6.7包含了Elasticsearch的升级版本,它不能以root身份运行。因此,SonarQube不能再作为root运行。
您跟踪的博客文章似乎建议/假设您以root用户身份运行。要不以root身份启动SonarQube,只需结束su
会话,或以自己的身份重新登录以启动进程。注意,您需要确保正在启动SonarQube的用户在SonarQube目录上有7个(read,write,execute)(递归),在日志文件上有6个(read,write)(如果日志文件已经存在的话)。
我已经在我的系统上本地配置了竹。我已经安装了SonarQube插件到它。 当我运行计划时,生成失败。我还附上了构建失败的日志。看来错误就在这里。 *由于返回[C:\sonar-runner-2.4\bin\sonar-runner-d sonar.login=admin-d sonar.jdbc.url=jdbc:mysql:/localhost:3306/sonar?UseUnicode=tru
问题内容: 为了学习,我需要在ubuntu服务器上安装sonarqube。 我按照本教程进行了安装:http : //www.naturalborncoder.com/methodology/2015/05/27/sonarqube-on- ubuntu-14-04/ (我在代理部分之前停了下来),但我无法访问127.0.0.1:9000。从日志来看,当我启动sonarcube时,elastics
问题内容: 我想同步地发出两个Observable对象(它们是异步的),一个接一个地返回第 一个 发出的Observable对象。如果第一个失败,则不应发出第二个。 假设我们有一个登录用户的Observable,还有一个登录 后 自动选择用户帐户的Observable 。 这是我尝试的: 不幸的是,这不适用于我的用例。它将以“ ob1”开始并行发出/调用两个可观察对象。 有人遇到过类似的用例吗?还
我想同步发射两个可观测对象(它们是异步的),一个接一个地返回第一个发射的可观测对象。如果第一个失败,则不应发出第二个。 假设我们有一个Observable可以让用户登录,另一个Observable可以在登录后自动选择用户的帐户。 这就是我所尝试的: 不幸的是,这不适用于我的用例。它将发出/调用两个平行的观测值,从“ob1”开始。 是否有人遇到过类似的用例?或者有没有一个想法,如何让可观测对象以同步
如何使用Sonar 2.3和Maven 3.0配置JaCoCo。4. 我的项目是一个多模块Maven项目。我的顶级pom包括以下内容: 运行mvn声纳后:声纳我得到0%代码覆盖报告声纳。我应该看到至少50%。注意,我确实在每个子项目的目标文件夹中看到了jacoco.exec。
情节 所有批处理应用程序(基于Spring批处理)都必须部署到Jboss EAP [Enterprise Workload/Scheduling][Shell脚本] 问题 由于批处理作业是通过HTTPendpoint异步启动的,shell脚本如何获得批处理作业的执行结果