Connect SonarQube in Azure Devops pipeline with Azure hosted agent

Hello All,

We have installed SonarQube in a Azure VM and allowed the port 9000. We have set up the firewall in such a way that SonarQube cannot be accessed in public network but can be accessed via Internal Jump server.

We have Integrated our Azure pipeline with SonarQube using Service connection.

When we try to run the sonarqube task in our Azure devops pipeline which runs on Azure hosted agent we are getting the below error in prepare analysis task :
-----------------------------------------ERROR message --------------------

2022-07-18T09:32:22.7582192Z ##[section]Starting: Prepare analysis on SonarQube
2022-07-18T09:32:22.7591275Z ==============================================================================
2022-07-18T09:32:22.7591593Z Task : Prepare Analysis Configuration
2022-07-18T09:32:22.7591905Z Description : Prepare SonarQube analysis configuration
2022-07-18T09:32:22.7592120Z Version : 5.6.1
2022-07-18T09:32:22.7592348Z Author : sonarsource
2022-07-18T09:32:22.7592752Z Help : Version: 5.6.1. More Information
2022-07-18T09:32:22.7593142Z ==============================================================================
2022-07-18T09:34:33.2902285Z ##[error][SQ] API GET ‘/api/server/version’ failed, error was: {“errno”:“ETIMEDOUT”,“code”:“ETIMEDOUT”,“syscall”:“connect”,“address”:“XX.XXX.XXX.X”,“port”:9000}
2022-07-18T09:34:33.2937402Z ##[section]Finishing: Prepare analysis on SonarQube

-------------------------------------- Error message ends ---------------------------------------

Question 1 : Do we need to allow the SonarQube in public for connecting with Azure Devops ?
Question 2 : Can we integrate multiple Azure devops organization in SonarQube ?

  1. Since Azure hosted agents are hosted by Microsoft, those agents would have to have access to your SonarQube server, or the traffic would need to be routed through your jump server.
  2. Connecting multiple Azure DevOps organizations to SonarQube requires Enterprise Edition or higher.

Hello Colin,

We have installed SonarQube Enterprise edition verison 9.3. After adding two organization, create new project using Azure Devops got disabled stating " The methord requires exaclty one Azure Devops organization". Could you please let us know if there is any setting that needs to be enabled to have multiple organizations ?

Import repositories from your DevOps Platform

__________________________ This is after adding two organizations.


Please advice us on the above query.

Hey there.

When using multiple organizations of a single DevOps platform, it becomes no longer possible to use the project onboarding wizard and you must manually create projects. That is what this message is telling you.

Thank you very much Colin