SonarScanner via CircleCI

Hi,

I’m trying to trigger a SonarScanner that’s downloaded via CircleCI process but I keep getting the following error, this is after running the scan with an additional -X debug mode, I couldn’t figure out what the error means.

07:25:26.029 INFO: Scanner configuration file: /home/circleci/repo/sonar-scanner-4.7.0.2747-linux/conf/sonar-scanner.properties
07:25:26.031 INFO: Project root configuration file: NONE
07:25:26.051 INFO: SonarScanner 4.7.0.2747
07:25:26.051 INFO: Java 11.0.14.1 Eclipse Adoptium (64-bit)
07:25:26.051 INFO: Linux 5.13.0-1023-aws amd64
07:25:26.051 INFO: SONAR_SCANNER_OPTS=-Xmx2048m
07:25:26.162 DEBUG: keyStore is : 
07:25:26.162 DEBUG: keyStore type is : pkcs12
07:25:26.162 DEBUG: keyStore provider is : 
07:25:26.162 DEBUG: init keystore
07:25:26.162 DEBUG: init keymanager of type SunX509
07:25:26.245 DEBUG: Create: /home/circleci/.sonar/cache
07:25:26.245 INFO: User cache: /home/circleci/.sonar/cache
07:25:26.245 DEBUG: Create: /home/circleci/.sonar/cache/_tmp
07:25:26.247 DEBUG: Extract sonar-scanner-api-batch in temp...
07:25:26.249 DEBUG: Get bootstrap index...
07:25:26.250 DEBUG: Download: *************************************/batch/index
07:25:26.853 DEBUG: Get bootstrap completed
07:25:26.856 INFO: ------------------------------------------------------------------------
07:25:26.857 INFO: EXECUTION FAILURE
07:25:26.857 INFO: ------------------------------------------------------------------------
07:25:26.857 INFO: Total time: 0.842s
07:25:26.870 INFO: Final Memory: 4M/20M
07:25:26.870 INFO: ------------------------------------------------------------------------
07:25:26.870 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: <!DOCTYPE html>
	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

Exited with code exit status 1

Could anyone help?

Thank you!

Hi,

That ‘bootstrap index’ is supposed to be a JSON document, but what the scanner got was HTML. This typically indicates a misconfiguration of the sonar.host.url value.

 
HTH,
Ann

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.