Sonarqube Azure Pipeline task fails due to corporate reverse proxy

Sonarqube

  • Developer Edition
  • Version 9.5 (build 56709)

Pipeline yaml (example):

  • task: SonarQubePrepare@5
    inputs:
    SonarQube: ‘Service Connection’
    scannerMode: ‘MSBuild’
    projectKey: ‘xxxx’
    projectName: ‘Example’

We have several Azure pipelines built, and the service connection is setup to hit the corporate reverse proxy setup for Sonarqube. The request should be forwarded to the Sonarqube installation (site:port) for analysis.We can’t open up the port to hit the Sonarqube server from Azure, so it has to be through a reverse proxy.

I keep getting the following error: API GET ‘/api/server/version’ failed, error was: {“errno”:“ETIMEDOUT”,“code”:“ETIMEDOUT”,“syscall”:“connect”,“address”:“xxx.xx.xx.xx”,“port”:443}

Is there any additional setup that needs to be performed? The documentation is rather sparse where reverse proxies and network appliances (F5 for example) are concerned.

Hey there.

I agree documentation is sparse here.

I would suggest taking a look at this thread, where a user has laid out the variables they said to set (SONAR_SCANNER_OPTS and HTTP_PROXY / HTTPS_PROXY)

Once we get you unblocked, we’ll forward this to our docs team as something we might be able to improve.