Sonar Runner无法通过Teamcity发布到Sonarqube

时间:2016-05-03 01:31:44

标签: sonarqube teamcity sonar-runner sonarqube-5.0

我对TeamCity和Sonar都比较陌生,请原谅我的任何困惑:)

我们的TeamCity构建使用Sonar Runner(v2.4)对C#项目执行分析,但未能将其发布到Sonarqube(v5.0.1)。

我已经尝试删除Sonarqube的所有插件以查看问题所在,但是只安装了C#插件(v3.3)时收到同样的错误

Sonarqube的访问日志表明分析正在击中Sonarqube,而sonar.log文件保持不变,即使使用DEBUG

我在下面的TeamCity构建中附加了错误

提前致谢

[16:02:50][Step 2/2] INFO: ----------------------------------------
[16:02:50][Step 2/2] INFO: EXECUTION FAILURE
[16:02:50][Step 2/2] INFO: ----------------------------------------------
[16:02:50][Step 2/2] Total time: 56.323s
[16:02:50][Step 2/2] ERROR: Error during Sonar runner execution
[16:02:50][Step 2/2] org.sonar.runner.impl.RunnerException: Unable to execute Sonar
[16:02:50][Step 2/2]    at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
[16:02:50][Step 2/2]    at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
[16:02:50][Step 2/2]    at java.security.AccessController.doPrivileged(Native Method)
[16:02:50][Step 2/2]    at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
[16:02:50][Step 2/2]    at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
[16:02:50][Step 2/2]    at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
[16:02:50][Step 2/2]    at org.sonar.runner.api.Runner.execute(Runner.java:100)
[16:02:50][Step 2/2]    at org.sonar.runner.Main.executeTask(Main.java:70)
[16:02:50][Step 2/2]    at org.sonar.runner.Main.execute(Main.java:59)
[16:02:50][Step 2/2] Final Memory: 20M/653M
[16:02:50][Step 2/2]    at org.sonar.runner.Main.main(Main.java:53)
[16:02:50][Step 2/2] INFO: ----------------------------------------------
[16:02:50][Step 2/2] Caused by: java.lang.IllegalStateException: Unable to publish results: /batch/upload_report?project=***********.CS&snapshot=5613683
[16:02:50][Step 2/2]    at org.sonar.batch.phases.UpdateStatusJob.uploadReport(UpdateStatusJob.java:69)
[16:02:50][Step 2/2]    at org.sonar.batch.phases.UpdateStatusJob.execute(UpdateStatusJob.java:54)
[16:02:50][Step 2/2]    at org.sonar.batch.phases.PhaseExecutor.updateStatusJob(PhaseExecutor.java:175)
[16:02:50][Step 2/2]    at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:133)
[16:02:50][Step 2/2]    at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:222)
[16:02:50][Step 2/2]    at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
[16:02:50][Step 2/2]    at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
[16:02:50][Step 2/2]    at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:235)
[16:02:50][Step 2/2]    at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:230)
[16:02:50][Step 2/2]    at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:223)
[16:02:50][Step 2/2]    at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
[16:02:50][Step 2/2]    at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
[16:02:50][Step 2/2]    at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:65)
[16:02:50][Step 2/2]    at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:52)
[16:02:50][Step 2/2]    at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:128)
[16:02:50][Step 2/2]    at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
[16:02:50][Step 2/2]    at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
[16:02:50][Step 2/2]    at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:171)
[16:02:50][Step 2/2]    at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
[16:02:50][Step 2/2]    at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
[16:02:50][Step 2/2]    at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
[16:02:50][Step 2/2]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[16:02:50][Step 2/2]    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[16:02:50][Step 2/2]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[16:02:50][Step 2/2]    at java.lang.reflect.Method.invoke(Unknown Source)
[16:02:50][Step 2/2]    at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
[16:02:50][Step 2/2]    ... 9 more
[16:02:50][Step 2/2] Caused by: java.lang.IllegalStateException: Fail to execute request [code=411, url=http://****************/batch/upload_report?project=***********.CS&snapshot=5613683]
[16:02:50][Step 2/2]    at org.sonar.batch.bootstrap.ServerClient.handleHttpException(ServerClient.java:132)
[16:02:50][Step 2/2]    at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:100)
[16:02:50][Step 2/2]    at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:92)
[16:02:50][Step 2/2]    at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:84)
[16:02:50][Step 2/2]    at org.sonar.batch.phases.UpdateStatusJob.uploadReport(UpdateStatusJob.java:67)
[16:02:50][Step 2/2]    ... 34 more
[16:02:50][Step 2/2] Caused by: org.sonar.api.utils.HttpDownloader$HttpException: Fail to download             [http://***************/batch/upload_report?project=**********.CS&snapshot=5613683]. Response code: 411
[16:02:50][Step 2/2]    at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:304)
[16:02:50][Step 2/2]    at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:254)
[16:02:50][Step 2/2]    at             org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:98)
[16:02:50][Step 2/2]    ... 37 more

1 个答案:

答案 0 :(得分:0)

该插件版本很古老。 (8个月:-))你能试试和更新版本吗?