Currently have:
- Jenkins (version 2.289.2)
- SonarQube (Community Edition Version 8.5.1 (build 38104))
Running in GCP Kubernetes.
I’m currently integrating SonarQube in Jenkins and after having configured SonarQube server and SonarQube scanner in Jenkins.
To test if everything is ok I put up a simple test:
- Cloning a GIT repo with a HelloWorld java in it
But this error keeps appearing:
[sonar_teste] $ /var/jenkins_home/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube_scanner/bin/sonar-scanner -X -Dsonar.host.url=https://XXXXXX/sonar ******** -Dsonar.projectKey=XXX -Dsonar.sourceEncoding=UTF-8 -Dsonar.projectBaseDir=/var/jenkins_home/workspace/sonar_teste
13:43:41.766 INFO: Scanner configuration file: /var/jenkins_home/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube_scanner/conf/sonar-scanner.properties
13:43:41.769 INFO: Project root configuration file: NONE
13:43:41.821 INFO: SonarScanner 4.6.2.2472
13:43:41.821 INFO: Java 11.0.11 AdoptOpenJDK (64-bit)
13:43:41.821 INFO: Linux 5.4.104+ amd64
13:43:42.129 DEBUG: keyStore is :
13:43:42.130 DEBUG: keyStore type is : pkcs12
13:43:42.130 DEBUG: keyStore provider is :
13:43:42.130 DEBUG: init keystore
13:43:42.131 DEBUG: init keymanager of type SunX509
13:43:42.393 DEBUG: Create: /var/jenkins_home/.sonar/cache
13:43:42.393 INFO: User cache: /var/jenkins_home/.sonar/cache
13:43:42.394 DEBUG: Create: /var/jenkins_home/.sonar/cache/_tmp
13:43:42.397 DEBUG: Extract sonar-scanner-api-batch in temp...
13:43:42.401 DEBUG: Get bootstrap index...
13:43:42.401 DEBUG: Download: https://xxxxxxxxxxxx/sonar/batch/index
13:43:43.338 DEBUG: Get bootstrap completed
13:43:43.356 INFO: ------------------------------------------------------------------------
13:43:43.356 INFO: EXECUTION FAILURE
13:43:43.356 INFO: ------------------------------------------------------------------------
13:43:43.357 INFO: Total time: 1.626s
13:43:43.380 INFO: Final Memory: 5M/20M
13:43:43.380 INFO: ------------------------------------------------------------------------
13:43:43.380 ERROR: Error during SonarScanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Fail to parse entry in bootstrap index:
at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.parse(BootstrapIndexDownloader.java:59)
at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:44)
at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
... 7 more
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed?
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE
The bootstrap index url returns:
sonar-scanner-engine-shaded-8.5.1.38104-all.jar|faeadd9760e8783594e743c495ad7d99
I search solutions but nothing seems to solve it.