Error during SonarScanner CLI execution java.lang.IllegalStateException

Template for a good new topic, formatted with Markdown:

  • ALM used (Azure DevOps)
  • CI system used (Azure DevOps)
  • Scanner command used when applicable (private details masked)
    Call to URL [https://api.sonarcloud.io/analysis/jres?os=windows&arch=amd64] failed
  • Languages of the repository
    Java
  • Only if the SonarCloud project is public, the URL
    • And if you need help with pull request decoration, then the URL to the PR too
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
##[error]01:22:44.129 ERROR Error during SonarScanner CLI execution 
java.lang.IllegalStateException: Call to URL [https://api.sonarcloud.io/analysis/jres?os=windows&arch=amd64] failed 
at org.sonarsource.scanner.lib.internal.http.ScannerHttpClient.callUrl(ScannerHttpClient.java:159) 
at org.sonarsource.scanner.lib.internal.http.ScannerHttpClient.callApi(ScannerHttpClient.java:126) 

  • Steps to reproduce
  • Potential workaround
 
Non-authoritative answer:
Name:    connectivity-alb-prod-733113120.eu-central-1.elb.amazonaws.com
Addresses: 18.157.152.83
3.69.136.108
3.123.100.211
Aliases:  api.sonarcloud.io

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hi,

Can we have the full analysis log please, including the full stacktrace?

 
Thx,
Ann

Please find the requested full Log file.
logs_70095.zip (63.5 KB)

Hi,

Thanks for the logs.

Caused by: java.net.SocketException: Connection reset

This makes me wonder about what’s on the network between your build agent and SonarQube Cloud. You’re on Azure DevOps… Is it a self-hosted agent? Is it possible there’s something “helpful” on the network blocking this connection?

Also, it’s failing at the JRE provisioning step. If you’ve got Java installed on the build agent, you can skip that step and see if you get any farther by setting sonar.scanner.skipJreProvisioning to true.

 
Ann