JetBrains / TeamCity.SonarQubePlugin

A plugin for TeamCity server allowing you to configure and run SonarQube analysis from the CI
Apache License 2.0
53 stars 31 forks source link

Fail to download libraries from server #96

Closed ctmay4 closed 2 years ago

ctmay4 commented 2 years ago

I am trying to set up the plugin. I already can run Sonarqube gradle task successfully in Teamcity. However when I try to add a build step with the plugin I get the following error. Is it failing to download something f rom Teamcity or from Sonarqube?

[08:37:18] :     [Step 2/2] SonarQube Runner 2.4
[08:37:18] :     [Step 2/2] Java 17.0.1 Eclipse Adoptium (64-bit)
[08:37:18] :     [Step 2/2] Linux 3.10.0-1160.49.1.el7.x86_64 amd64
[08:37:18] :     [Step 2/2] INFO: Error stacktraces are turned on.
[08:37:18] :     [Step 2/2] INFO: Runner configuration file: NONE
[08:37:18] :     [Step 2/2] INFO: Project configuration file: NONE
[08:37:18] :     [Step 2/2] INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
[08:37:18] :     [Step 2/2] INFO: Work directory: /tcdata/tcagent-btp-04/work/3c6418c8153f59df/./.sonar
[08:37:19] :     [Step 2/2] INFO: SonarQube Server 9.2.4.50792
[08:37:19] :     [Step 2/2] INFO: ------------------------------------------------------------------------
[08:37:19] :     [Step 2/2] INFO: EXECUTION FAILURE
[08:37:19] :     [Step 2/2] INFO: ------------------------------------------------------------------------
[08:37:19] :     [Step 2/2] Total time: 0.371s
[08:37:19]W:     [Step 2/2] ERROR: Error during Sonar runner execution
[08:37:19] :     [Step 2/2] Final Memory: 3M/24M
[08:37:19]W:     [Step 2/2] java.lang.IllegalStateException: Fail to download libraries from server
[08:37:19] :     [Step 2/2] INFO: ------------------------------------------------------------------------
[08:37:19]W:     [Step 2/2]     at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:78)
[08:37:19]W:     [Step 2/2]     at org.sonar.runner.impl.Jars.download(Jars.java:57)
[08:37:19]W:     [Step 2/2]     at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:46)
[08:37:19]W:     [Step 2/2]     at org.sonar.runner.impl.JarDownloader.checkVersionAndDownload(JarDownloader.java:37)
[08:37:19]W:     [Step 2/2]     at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:71)
[08:37:19]W:     [Step 2/2]     at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
[08:37:19]W:     [Step 2/2]     at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
[08:37:19]W:     [Step 2/2]     at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
[08:37:19]W:     [Step 2/2]     at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
[08:37:19]W:     [Step 2/2]     at org.sonar.runner.api.Runner.execute(Runner.java:100)
[08:37:19]W:     [Step 2/2]     at org.sonar.runner.Main.executeTask(Main.java:70)
[08:37:19]W:     [Step 2/2]     at org.sonar.runner.Main.execute(Main.java:59)
[08:37:19]W:     [Step 2/2]     at org.sonar.runner.Main.main(Main.java:53)
[08:37:19]W:     [Step 2/2] Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
[08:37:19]W:     [Step 2/2]     at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:72)
[08:37:19]W:     [Step 2/2]     ... 12 more
[08:37:19]W:     [Step 2/2] Process exited with code 1
[08:37:19]E:     [Step 2/2] Process exited with code 1 (Step: SonarQube (SonarQube Runner))
[08:37:19]E:     [Step 2/2] Step SonarQube (SonarQube Runner) failed
ctmay4 commented 2 years ago

I manually set the scanner version and that fixed it.