VSTS SonarQube task failing from OnPrem Agent behind a proxy

We are using the SonarQube task to prepare analysis configuration. On our on-prem agents we get the following error - “##[error][SQ] API GET ‘/api/server/version’ failed, error was: {“code”:“ECONNRESET”}”. This works using our VSTS Azure Agents. The on-prem agents are configured to run behind a proxy, as per Microsoft Documentation (https://docs.microsoft.com/en-us/vsts/pipelines/agents/proxy?view=vsts). Other externally connected tasks work fine (e.g. Nuget restore). Any help much appreciated.

1 Like

I got the same issue here, have you found the solution for that?

1 Like

You can fix this by setting the NO_PROXY environment variable for your agent. the request library that is used to assemble the request is aware of the HTTP(S)_PROXY and NO_PROXY environment variables. See: https://www.npmjs.com/package/request#controlling-proxy-behaviour-using-environment-variables

2 Likes