Sonar-scanner - "Fail to parse entry in bootstrap index.."

Hi, all.
I have a strange problem.
My stack:

  • SonarQube Data Center Edition - Version 7.9.2 (build 30863)
  • Jenkins 2.204.1 + SonarQube Scanner plugin
  • sonar-scanner on Jenkins

Check the link from Jenkins to SonarQube:

  curl -k
  Finished: SUCCESS

I created Jenkins pipeline for test analysis simple .yaml file.

pipeline {
   agent {
      label 'master'
   stages {
      stage('BitBucket') {
         steps {
            git branch: 'XXX', credentialsId: 'YYY', url: ''
      stage('Sonarqube') {
         environment {
            scannerHome = tool 'sonar-scanner'
         steps {
            withSonarQubeEnv('SonarSigma') {
                sh "${scannerHome}/bin/sonar-scanner -Dsonar.login=${SONAR_AUTH_TOKEN}"
            timeout(time: 10, unit: 'MINUTES') {
               waitForQualityGate abortPipeline: true

There is in root directory of project
sonar.projectName=project :: Services :: repo

After start Jenkins pipeline, I get error in stage(‘Sonarqube’)

[Pipeline] stage
[Pipeline] { (Sonarqube)
[Pipeline] tool
[Pipeline] withEnv
[Pipeline] {
[Pipeline] withSonarQubeEnv
Injecting SonarQube environment variables using the configuration: SonarSigma
[Pipeline] {
[Pipeline] sh
[check_sonar] Running shell script
+ /opt/sonar-scanner- -Dsonar.login=******
INFO: Scanner configuration file: /opt/sonar-scanner-
INFO: Project root configuration file: /opt/jenkins/workspace/SANDBOX/check_sonar/
11:30:46.026 INFO: SonarQube Scanner
11:30:46.028 INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
11:30:46.028 INFO: Linux 3.10.0-693.11.6.el7.x86_64 amd64
11:30:46.171 DEBUG: keyStore is : 
11:30:46.171 DEBUG: keyStore type is : pkcs12
11:30:46.171 DEBUG: keyStore provider is : 
11:30:46.171 DEBUG: init keystore
11:30:46.172 DEBUG: init keymanager of type SunX509
11:30:46.282 DEBUG: Create: /var/lib/jenkins/.sonar/cache
11:30:46.283 INFO: User cache: /var/lib/jenkins/.sonar/cache
11:30:46.283 DEBUG: Create: /var/lib/jenkins/.sonar/cache/_tmp
11:30:46.285 DEBUG: Extract sonar-scanner-api-batch in temp...
11:30:46.288 DEBUG: Get bootstrap index...
11:30:46.288 DEBUG: Download: /batch/index
11:30:46.530 DEBUG: Get bootstrap completed
11:30:46.534 INFO: ------------------------------------------------------------------------
11:30:46.534 INFO: ------------------------------------------------------------------------
11:30:46.534 INFO: Total time: 0.571s
11:30:46.548 INFO: Final Memory: 3M/14M
11:30:46.549 INFO: ------------------------------------------------------------------------
11:30:46.549 ERROR: Error during SonarQube Scanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(
	at java.base/ Method)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(
	at org.sonarsource.scanner.api.EmbeddedScanner.doStart(
	at org.sonarsource.scanner.api.EmbeddedScanner.start(
	at org.sonarsource.scanner.cli.Main.execute(
	at org.sonarsource.scanner.cli.Main.main(
Caused by: java.lang.IllegalStateException: Fail to parse entry in bootstrap index: <!doctype html><html lang="en">
><body><div id="content"><div class="global-loading"><i class="spinner global-loading-spinner"></i> <span class="global-loading-text">Loading...</span></div></div><script>window.baseUrl = '';
	at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.parse(
	at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(
	at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(
	... 7 more
11:30:46.552 ERROR: 
11:30:46.552 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

As I understand it, the scanner does not get what it expects? I already broke my head with this problem.


Welcome to the community!

Instead of getting a jar, an HTML error page is being returned. You need to double-check your Jenkins global configuration where the SonarQube instance is set up and make sure the URL is correct. If it is, then check the network to see what’s interfering with the call.


1 Like

Hi, Ann
You’re right! I found my trouble. URL of SonarQube contained some error - slash at the end + one extra space. After the correcting URL SonarQube at Jenkins - Configure System - SonarQube servers, everything worked.

Thanks for the help.

1 Like

Thank you, the hint with trailing slash and additional space was exactly my problem.