Search code examples
azureazure-devopssonarqubevpnagent

Can't access internal SonarQube (on-premises) from Azure DevOps (cloud - PaaS) despite having installed the agent


I cannot contact my internal on-premises SonarQube from Azure DevOps (cloud).

Here's the error I get on the Azure Build Pipeline:

##[debug][SQ] API GET '/api/server/version' failed, error was: {"code":"ETIMEDOUT","errno":"ETIMEDOUT","syscall":"connect","address":"172.16.8.3","port":9002}

My on-premises SonarQube is internal (accessible only through VPN) but as I installed an Azure agent on this machine (where Azure is already capable of automatically publishing my websites) I thought I didn't need anything else for it to become accessible from Azure DevOps.

What am I missing?


Solution

  • Although it is possible to use the agents to publish a website on an internal server (only accessible by VPN), Sonarqube isn't prepared to work in a similar fashion (uploading the necessary files from Azure DevOps).

    There are only 2 solutions to this problem:

    • Create an exception on your VPN, authorizing the access to the Sonarqube port. This solution has security constraints.

    • Use SonarCloud (SonarQube cloud version) instead of SonarQube. This solution might have an associated cost, as the SonarCloud free version forces us to share our code with the public. Only the paid version ensures your code remains private.