Azure devops self hosted agent ##[error]ERROR: SonarCloud server [https://sonarcloud.io] can not be reached

2020-06-08T11:22:26.6336579Z ##[error]ERROR: Error during SonarScanner execution
2020-06-08T11:22:26.6339051Z
2020-06-08T11:22:26.6343205Z ##[error]org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
2020-06-08T11:22:26.6344434Z
2020-06-08T11:22:26.6352224Z ##[error]at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
2020-06-08T11:22:26.6360909Z
2020-06-08T11:22:26.6362496Z ##[error]at java.base/java.security.AccessController.doPrivileged(Native Method)
2020-06-08T11:22:26.6364581Z
2020-06-08T11:22:26.6366259Z ##[error]at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
2020-06-08T11:22:26.6368242Z
2020-06-08T11:22:26.6371717Z ##[error]at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
2020-06-08T11:22:26.6375532Z
2020-06-08T11:22:26.6377115Z ##[error]at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
2020-06-08T11:22:26.6379116Z
2020-06-08T11:22:26.6379806Z ##[error]at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
2020-06-08T11:22:26.6380941Z
2020-06-08T11:22:26.6381889Z ##[error]at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
2020-06-08T11:22:26.6398684Z
2020-06-08T11:22:26.6399670Z ##[error]at org.sonarsource.scanner.cli.Main.main(Main.java:61)
2020-06-08T11:22:26.6436388Z
2020-06-08T11:22:26.6437128Z ##[error]Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
2020-06-08T11:22:26.6438293Z

Hi @sgajulapalli and welcome to the community !

Do you have a proxy between the machine that hosts the agent and internet ? If yes, you may have to configure it also for Node.js HTTP calls, because we rely on it to communicate with SonarCloud on some steps.

HTH,
Mickaël

Hi @mickaelcaro. We didn’t have any proxy setup. By default all outbound traffic is allowed from the agent.

Does it happen all the time ? On every analysis ?

Yes Mickael, It happens on every analysis.

Ok then, can you try to curl SonarCloud.io from the machine where the build agent is installed ? Are you able to reach it ?

Yes, We are able to reach it with Curl command.

This is a Ubuntu self hosted machine.

Ok that’s a bit weird. Could you give me please the full logs in debug mode of this step ? That could help me having a bit more context (i can send you a PM if you need to send it privately). Thanks !

Sure, Could you please send me the personal mail. I will send you the logs.