Failing on Run Code Analysis Task

1.I am using the SonarCloud with VSTS.
2.I have configure the VSTS tasks and SonarCloud connection in VSTS.
3.First time the prepare analysis task is failing, so i used following parameter in my VSTS environment variables and it’s working now.
4.I have also setup the proxy in IE connection, and my VSTS agent is also running under corporate proxy
5. after all above setup my prepare analysis task is succeeding now, but Run Code Analysis Task is failing now with following errors:
[error]ERROR: SonarQube server [] can not be reached
[error]ERROR: Error during SonarQube Scanner execution
##[error]org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
below the log file of VSTS RUn Code Analysis Task:
logs.txt (12.1 KB)
6.I have also tried this: SONAR_SCANNER_OPTS=-Dhttps.proxyHost=xxx -Dhttps.proxyPort=xxxx
Is there any perfect solution for my issue, Please suggest?


Hi @RichardEllis and welcome to the community !

Connection between Azure DevOps (VSTS) agent, with SonarCloud, is done through different ways :

  • In the Prepare analysis task, one of our scanner is making API calls with the .NET stack, that’s the reason why you succeeded to connect it with the
  • In the Run Code Analysis task, we use the node.js stack, provided by the Azure DevOps libraries, so then you should rely to the node.js way of configuring proxies, but normally, using either HTTP_PROXY or HTTPS_PROXY environment variable, depending on your situation, should be ok.

Let us know !


1 Like

Hi @mickaelcaro
Tried to add environment variables: HTTP_PROXY and HTTPS_PROXY.
Still getting same error.