2022-07-06T07:39:37.9036194Z ##[error]ERROR: Error during SonarScanner execution 2022-07-06T07:39:37

HI Team,

Azure pipeline is failing at Run Code Analysis.

2022-07-06T07:39:36.5899996Z ##[section]Starting: SonarQubeAnalyze
2022-07-06T07:39:36.5904919Z ==============================================================================
2022-07-06T07:39:36.5905210Z Task         : Run Code Analysis
2022-07-06T07:39:36.5905495Z Description  : Run scanner and upload the results to the SonarQube server.
2022-07-06T07:39:36.5905756Z Version      : 5.6.1
2022-07-06T07:39:36.5905955Z Author       : sonarsource
2022-07-06T07:39:36.5906462Z Help         : Version: 5.6.1. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

[More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
2022-07-06T07:39:36.5907019Z ==============================================================================
2022-07-06T07:39:36.7430503Z [command]/home/vsts/work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/5.6.1/sonar-scanner/bin/sonar-scanner
2022-07-06T07:39:36.9109007Z INFO: Scanner configuration file: /home/vsts/work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/5.6.1/sonar-scanner/conf/sonar-scanner.properties
2022-07-06T07:39:36.9119308Z INFO: Project root configuration file: NONE
2022-07-06T07:39:36.9461041Z INFO: SonarScanner 4.6.2.2472
2022-07-06T07:39:36.9465206Z INFO: Java 11.0.15 Eclipse Adoptium (64-bit)
2022-07-06T07:39:36.9466172Z INFO: Linux 5.13.0-1031-azure amd64
2022-07-06T07:39:37.2678936Z INFO: User cache: /home/vsts/.sonar/cache
2022-07-06T07:39:37.8846572Z INFO: ------------------------------------------------------------------------
2022-07-06T07:39:37.8847463Z INFO: EXECUTION FAILURE
2022-07-06T07:39:37.8848225Z INFO: ------------------------------------------------------------------------
2022-07-06T07:39:37.8855884Z INFO: Total time: 0.983s
2022-07-06T07:39:37.9001562Z INFO: Final Memory: 4M/20M
2022-07-06T07:39:37.9002807Z INFO: ------------------------------------------------------------------------
2022-07-06T07:39:37.9036194Z ##[error]ERROR: Error during SonarScanner execution
2022-07-06T07:39:37.9044646Z 
2022-07-06T07:39:37.9045457Z ##[error]org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
2022-07-06T07:39:37.9046735Z 
2022-07-06T07:39:37.9048068Z ##[error]at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
2022-07-06T07:39:37.9049709Z 
2022-07-06T07:39:37.9050559Z ##[error]at java.base/java.security.AccessController.doPrivileged(Native Method)
2022-07-06T07:39:37.9052003Z 
2022-07-06T07:39:37.9053048Z ##[error]at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
2022-07-06T07:39:37.9054599Z 
2022-07-06T07:39:37.9055631Z ##[error]at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
2022-07-06T07:39:37.9057337Z 
2022-07-06T07:39:37.9058269Z ##[error]at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
2022-07-06T07:39:37.9059756Z 
2022-07-06T07:39:37.9060662Z ##[error]at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
2022-07-06T07:39:37.9109404Z 
2022-07-06T07:39:37.9110421Z ##[error]at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
2022-07-06T07:39:37.9111346Z 	at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
2022-07-06T07:39:37.9111811Z 	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
2022-07-06T07:39:37.9112690Z ##[error]Caused by: java.lang.IllegalStateException: Fail to parse entry in bootstrap index: <!DOCTYPE html>
2022-07-06T07:39:37.9114517Z ##[error]at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.parse(BootstrapIndexDownloader.java:59)
	at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:44)
2022-07-06T07:39:37.9115390Z 
2022-07-06T07:39:37.9115810Z 	at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.parse(BootstrapIndexDownloader.java:59)
2022-07-06T07:39:37.9117054Z 
2022-07-06T07:39:37.9117913Z ##[error]at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
2022-07-06T07:39:37.9119178Z 
2022-07-06T07:39:37.9120471Z ##[error]at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
2022-07-06T07:39:37.9121622Z 	at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
2022-07-06T07:39:37.9122250Z 	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
2022-07-06T07:39:37.9129175Z ##[error]... 7 more
2022-07-06T07:39:37.9130719Z ##[error]ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
2022-07-06T07:39:37.9131297Z 
2022-07-06T07:39:37.9131526Z ERROR: 
2022-07-06T07:39:37.9132062Z ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
2022-07-06T07:39:38.2360012Z ##[error]The process '/home/vsts/work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/5.6.1/sonar-scanner/bin/sonar-scanner' failed with exit code 1
2022-07-06T07:39:38.2393463Z ##[section]Finishing: SonarQubeAnalyze

Hi,

Welcome to the community!

Here’s the heart of the problem:

The initial call to the server is being answered with an HTML document, rather than the JSON it expects. More than likely, this means that your SonarQube URL (sonar.host.url) is misconfigured, although it could also be something “helpful” on the network interfering.

 
HTH,
Ann