我的Sonarqube 5.1
实例说它已经启动,但我的版本仍然失败。这可能与Sonar Search无法正常启动有关:
2015.06.22 15:01:07 WARN es[o.s.p.ProcessEntryPoint] Fail to start search
org.elasticsearch.transport.BindTransportException: Failed to bind to [9001]
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:426) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:295) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.transport.TransportService.doStart(TransportService.java:91) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.node.internal.InternalNode.start(InternalNode.java:242) ~[elasticsearch-1.4.4.jar:na]
at org.sonar.search.SearchServer.start(SearchServer.java:46) [sonar-search-5.1.1.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:77) ~[sonar-process-5.1.1.jar:na]
at org.sonar.search.SearchServer.main(SearchServer.java:80) [sonar-search-5.1.1.jar:na]
Caused by: org.elasticsearch.common.netty.channel.ChannelException: Failed to bind to: 0.0.0.0/0.0.0.0:9001
at org.elasticsearch.common.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.transport.netty.NettyTransport$1.onPortNumber(NettyTransport.java:417) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.common.transport.PortsRange.iterate(PortsRange.java:58) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:413) ~[elasticsearch-1.4.4.jar:na]
... 8 common frames omitted
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.7.0_55]
at sun.nio.ch.Net.bind(Net.java:444) ~[na:1.7.0_55]
at sun.nio.ch.Net.bind(Net.java:436) ~[na:1.7.0_55]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214) ~[na:1.7.0_55]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.7.0_55]
at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[elasticsearch-1.4.4.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_55]
at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_55]
2015.06.22 15:01:07 INFO es[o.elasticsearch.node] [sonar-1434999664155] stopping ...
2015.06.22 15:01:07 INFO es[o.elasticsearch.node] [sonar-1434999664155] stopped
2015.06.22 15:01:07 INFO es[o.elasticsearch.node] [sonar-1434999664155] closing ...
2015.06.22 15:01:07 INFO es[o.elasticsearch.node] [sonar-1434999664155] closed
<-- Wrapper Stopped
或此error,即使我已更新为sonar-java-plugin-3.3
,仍然存在问题:
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.NoSuchMethodError: org.sonar.api.resources.Project.getConfiguration()Lorg/apache/commons/configuration/Configuration;
at org.sonar.plugins.java.JavaSquidSensor.createConfiguration(JavaSquidSensor.java:106)
at org.sonar.plugins.java.JavaSquidSensor.analyse(JavaSquidSensor.java:82
我正在运行Sonar作为服务,我重新开始认为它会选择新的插件,但它没有。
如何正确重启Sonar以获取文件更改?
答案 0 :(得分:1)
您可以在SonarQube日志中读取的错误很明显:
Address already in use: bind
请阅读Upgrade SonarQube issues上的答案,了解会发生什么以及该怎么做。
答案 1 :(得分:0)
我想你在Windows下运行SonarQube。
您是否可以从Windows服务屏幕启动SonarQube作为服务? 如果是,您是否能够打开Sonar仪表板(不启动任何分析)并让SonarQube服务仍然运行?
答案 2 :(得分:0)
弹性搜索未正确停止。您可以删除运行端口9001的进程并尝试再次启动声纳。它会工作。
要在9001上终止进程,您可以尝试以下命令。
sudo lsof -t -i:9001 ---它将列出在端口9001上运行的所有进程。然后你可以试试
** sudo kill sudo lsof -t -i:9001**
---此命令将终止9001上的所有进程。