2015-06-22 77 views
1

我的Sonarqube 5.1實例聲稱它已啓動,但我的構建失敗。這可能是與聲納搜尋未正常啓動:聲吶啓動但構建失敗

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以便它能夠接收文件更改?

回答

0

我想你在Windows下運行SonarQube。

您是否能夠從Windows服務屏幕中將SonarQube作爲服務啓動? 如果是,是否可以打開Sonar儀表板(不啓動任何分析)並讓SonarQube服務仍然運行?

1

,你可以在SonarQube日誌讀取的錯誤是顯而易見的:

Address already in use: bind 

請閱讀我的答案上Upgrade SonarQube issues知道會發生什麼,做些什麼。

0

彈性搜索沒有正確停止。您可以刪除運行端口9001的進程並嘗試再次啓動聲吶。它會工作。 殺死9001上的進程你可以嘗試下面的命令。 須藤lsof的-t -i:9001 ---它會列出所有的端口9001上運行,那麼你可以嘗試 **須藤殺死sudo lsof -t -i:9001**過程---這個命令會殺死所有的在9001

過程