When Sonar analysis happens from Teamcity we are getting as error : Caused by: java.lang.IllegalStateException: Fail to bootstrap from server. Bootstrap index was

Hi Team,

When Sonar analysis happens from Teamcity we are getting as error : Caused by: java.lang.IllegalStateException: Fail to bootstrap from server. Bootstrap index was
[06:43:17] Step 2/2: SonarQube Runner (SonarQube Runner)

[06:43:17] [Step 2/2] Starting SQS from H:\BuildAgent\tools\sonar-qube-scanner.3.0.3.778-scanner

[06:43:17] [Step 2/2] -classpath

[06:43:17] [Step 2/2] H:\BuildAgent\tools\sonar-qube-scanner.3.0.3.778-scanner\lib\sonar-scanner-cli-3.0.3.778.jar

[06:43:17] [Step 2/2] org.sonarsource.scanner.cli.Main

[06:43:17] [Step 2/2] “-Dproject.home=.”

[06:43:17] [Step 2/2] “-Dsonar.host.url=http://sonarqube.broadridge.net:9000/about”

[06:43:17] [Step 2/2] “-Dsonar.jdbc.username=sa-teamcity”

[06:43:17] [Step 2/2] “-Dsonar.projectKey=FundsNa”

[06:43:17] [Step 2/2] “-Dsonar.projectName=Funds NA”

[06:43:17] [Step 2/2] “-Dsonar.projectVersion=81”

[06:43:17] [Step 2/2] “-Dsonar.sources=fundreports/src”

[06:43:17] [Step 2/2] "-Dsonar.password=*****"

[06:43:17] [Step 2/2] “-Dsonar.login=SonarqubeTeamCity”

[06:43:17] [Step 2/2] “-Dscanner.home=H:\BuildAgent\tools\sonar-qube-scanner.3.0.3.778-scanner”

[06:43:17] [Step 2/2] “-Dsonar.dynamicAnalysis=reuseReports”

[06:43:17] [Step 2/2] Starting: “C:\Program Files\Java\jdk1.8.0_102\bin\java.exe” -classpath H:\BuildAgent\tools\sonar-qube-scanner.3.0.3.778-scanner\lib\sonar-scanner-cli-3.0.3.778.jar org.sonarsource.scanner.cli.Main “-Dproject.home=.” “-Dsonar.host.url=http://sonarqube.broadridge.net:9000/about” “-Dsonar.jdbc.username=sa-teamcity” “-Dsonar.projectKey=FundsNa” “-Dsonar.projectName=Funds NA” “-Dsonar.projectVersion=81” “-Dsonar.sources=fundreports/src” "-Dsonar.password=*****" “-Dsonar.login=SonarqubeTeamCity” “-Dscanner.home=H:\BuildAgent\tools\sonar-qube-scanner.3.0.3.778-scanner” “-Dsonar.dynamicAnalysis=reuseReports”

[06:43:17] [Step 2/2] in directory: H:\BuildAgent\work\2b25e9775678a7b3

[06:43:17] [Step 2/2] INFO: Scanner configuration file: H:\BuildAgent\tools\sonar-qube-scanner.3.0.3.778-scanner\conf\sonar-scanner.properties

[06:43:17] [Step 2/2] INFO: Project root configuration file: NONE

[06:43:17] [Step 2/2] INFO: SonarQube Scanner 3.0.3.778

[06:43:17] [Step 2/2] INFO: Java 1.8.0_102 Oracle Corporation (64-bit)

[06:43:17] [Step 2/2] INFO: Windows Server 2012 R2 6.3 amd64

[06:43:17] [Step 2/2] INFO: User cache: C:\Users\sa_tc.sonar\cache

[06:43:18] [Step 2/2] INFO: ------------------------------------------------------------------------

[06:43:18] [Step 2/2] INFO: EXECUTION FAILURE

[06:43:18] [Step 2/2] INFO: ------------------------------------------------------------------------

[06:43:18] [Step 2/2] INFO: Total time: 0.479s

[06:43:18] [Step 2/2] ERROR: Error during SonarQube Scanner execution

[06:43:18] [Step 2/2] INFO: Final Memory: 4M/245M

[06:43:18] [Step 2/2] INFO: ------------------------------------------------------------------------

[06:43:18] [Step 2/2] org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube

[06:43:18] [Step 2/2] at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:84)

[06:43:18] [Step 2/2] at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:71)

[06:43:18] [Step 2/2] at java.security.AccessController.doPrivileged(Native Method)

[06:43:18] [Step 2/2] at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:71)

[06:43:18] [Step 2/2] at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:67)

[06:43:18] [Step 2/2] at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:218)

[06:43:18] [Step 2/2] at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:156)

[06:43:18] [Step 2/2] at org.sonarsource.scanner.cli.Main.execute(Main.java:74)

[06:43:18] [Step 2/2] at org.sonarsource.scanner.cli.Main.main(Main.java:61)

[06:43:18] [Step 2/2] Caused by: java.lang.IllegalStateException: Fail to bootstrap from server. Bootstrap index was:

Greetings @Geeth,
reading your logs I can see that you are using a very old version of the scanner, i.e 3.0.3 from 2017 May.
I would start by using the most recent one, 4.2 and see if the same issue occurs.
Alex.

1 Like

Also, the host url should not have about at the end.

1 Like

Where to change the about from url I have updated/attached the connection from teamcity …

I don’t use TeamCity, but I guess it’s the second text field on the page, and that the about is on the end of the value that’s been entered into that field.

1 Like