SonarQube Azure DevOps Pipeline Scan Fails

I am trying to run SonarQube codes scans on Azure DevOps pipelines. I am using SonarQube deployed on Azure by zip. These scans were working previously. No changes has been made. We are using Azure VSTS default agents. The only change is that we are now using Sonar 5.15 extension. Previous successful scans were using Sonar 5.13. Could this be an issue with the extension version?

Please see the error below.

Starting: Prepare analysis on SonarQube

Task : Prepare Analysis Configuration
Description : Prepare SonarQube analysis configuration
Version : 5.15.0
Author : sonarsource
Help : Version: 5.15.0. More Information

##[error][SQ] API GET ‘/api/server/version’ failed, error was: {“code”:“ETIMEDOUT”,“connect”:true}
Finishing: Prepare analysis on SonarQube

Hey there.

First, let’s try and take the task out of the equation.

If you try and directly query your SonarQube instance prior to this task (something like Invoke-WebRequest ''), is it able to connect?

I have been doing some troubleshooting on this. My SonarQube server is hosted in Azure. Somehow this is related to Azure DevOps network traffic back to my SonarQube server. If I open the server to any any, the jobs complete without issue. However, when I close down traffic to the world, the jobs fail. The Azure DevOps IP addresses change on a weekly basis so find the IP addresses and adding will not work.

I tried creating a self hosted agent so I can at least open all ports specifically to my self hosted agent. The problem now is that I get the following error trying to run the pipeline scans through my self hosted agent. Any help with this?
##[error]No agent found in pool ksfdevops which satisfies the specified demands: java, Agent.Version -gtVersion 2.199

When I search on the root of your error message,

I find indications that this is on the Azure side. You should make sure your versions are up to date (like using the latest azure pipelines agent.


I worked with Microsoft support on this issue, and they insist that the problem sits with SonarQube. I did not have time to be going back and forth MS support on this.

I created a self-hosted agent which solved my problems. There were some issues with getting this setup correctly, which included installing Python and Java on the self-hosted agent and listing the path in the agent capabilities. So, the solution for me was to use the self-hosted agent for pipeline scans using SonarQube. All other pipelines I can use the default Azure agents. Thank you for your help.

Best Regards,

Any updates on this. It is kind of sad this just kind of died back in Jul of '23.

I am also facing this issue and Microsoft has said the same thing to me. SO please work on a fix thanks.