Sonarscanner - Failed bootstrap index response

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube: 9.9.0.65466 Community Edition
    SonarScanner: 4.8.0.2856
    Java: Java 17.0.6 Oracle Corporation (64-bit)
    Window: Windows Server 2012 R2 6.3 amd64

  • how is SonarQube deployed: zip, Docker, Helm
    Extracted binary zip folder and put in window Server 20122 R2 server

  • what are you trying to achieve
    I created a simple .NetFramework 4.6 project and analysis using sonarscanner

    Scanner Execute script:
    1.
    SonarScanner.MSBuild.exe begin /k:"SampleWeb" /d:sonar.host.url="http://IP:9000" /d:sonar.login="token"

    Result: Success to run the script

    MsBuild.exe /t:Rebuild

    Result: Success with warning

    SonarScanner.MSBuild.exe end /d:sonar.login="token"

    Result: Failed with Error: Failed bootstrap index response

    ERROR: Error during SonarScanner execution
    org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarSc
    anner analysis
            at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
            at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
            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:74)
            at org.sonarsource.scanner.cli.Main.main(Main.java:62)
    Caused by: java.lang.IllegalStateException: Fail to parse entry in bootstrap index:
            at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.parse(BootstrapIndexDownloader.java:60)
            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
    ERROR:
    The SonarScanner did not complete successfully
  • what have you tried so far to achieve this
    1. Delete the cache folder under .\sonar\cache

Hi,

When analysis proper begins (in the end step) the first thing the scanner does is reach out to SonarQube to get some basic data; the bootstrap index. That you got an error on that step indicates one of:

  • analysis was given the wrong URL for SonarQube (double-check your URL)
  • SonarQube isn’t reachable from where analysis is running (check with your network folks)
  • SonarQube is in a bad state (check your server logs)

 
HTH,
Ann