Azure Pipeline execution error

Requesting help to resolve issue in Azure Pipeline:

  • which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension) : SonarQube community build 2025.1 LTA
  • how is SonarQube deployed: zip
  • what are you trying to achieve - Integration of SonarQube in Azure Pipeline
  • what have you tried so far to achieve this - followed step wise process to integrate SonarQube with Azure Pipelines

Detailed logs here:

2025-07-09T11:15:25.5764381Z [INFO]  SonarQube Server: Downloading scanner from https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.2.0.117568/sonar-scanner-10.2.0.117568-net-framework.zip
2025-07-09T11:15:25.5765384Z Downloading: https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.2.0.117568/sonar-scanner-10.2.0.117568-net-framework.zip
2025-07-09T11:15:29.2768093Z Extracting archive
2025-07-09T11:15:29.2768537Z [command]C:\Windows\system32\chcp.com 65001
2025-07-09T11:15:29.2768932Z Active code page: 65001
2025-07-09T11:15:29.2770133Z [command]C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('E:\AzDoTC\_temp\61912bb9-790e-4e74-b949-09ac39950920', 'E:\AzDoTC\_temp\e1e1a1b2-c046-443a-a4f7-fcf6dcbfd78a')"
2025-07-09T11:15:33.9571847Z Caching tool: SonarScanner .NET 10.2.0 x64
2025-07-09T11:15:36.5895024Z [command]"E:\AzDoTC\_tool\SonarScanner .NET\10.2.0\x64\SonarScanner.MSBuild.exe" begin /k:Projectname
2025-07-09T11:15:37.5430055Z SonarScanner for MSBuild 10.2
2025-07-09T11:15:37.5987032Z Using the .NET Framework version of the Scanner for MSBuild
2025-07-09T11:15:37.6005272Z Pre-processing started.
2025-07-09T11:15:37.8377633Z Preparing working directories...
2025-07-09T11:15:39.5444971Z 11:15:39.378  Updating build integration targets...
2025-07-09T11:15:43.2058996Z ##[error]11:15:43.091  An error occured while querying the server version! Please check if the server is running and if the address is correct.
2025-07-09T11:15:43.2961634Z 11:15:43.091  An error occured while querying the server version! Please check if the server is running and if the address is correct.
2025-07-09T11:15:43.3117145Z ##[error]11:15:43.2  Pre-processing failed. Exit code: 1
2025-07-09T11:15:43.4111816Z 11:15:43.2  Pre-processing failed. Exit code: 1
2025-07-09T11:15:43.6556449Z ##[error][ERROR] SonarQube Server: Error while executing task Prepare: The process 'E:\AzDoTC\_tool\SonarScanner .NET\10.2.0\x64\SonarScanner.MSBuild.exe' failed with exit code 1
2025-07-09T11:15:43.6733542Z ##[error]The process 'E:\AzDoTC\_tool\SonarScanner .NET\10.2.0\x64\SonarScanner.MSBuild.exe' failed with exit code 1
2025-07-09T11:15:43.7885757Z ##[section]Finishing: SonarQubePrepare

Hi,

The call for the server version is the very first call the scanner makes to the server. The fact that it’s failing indicates that the sonar.host.url is misconfigured.

 
HTH,
Ann

Hi, thanks for the response. The host url is configured as below :
http://[ip_address]:9000/sonar

Please let me know if this is not right.

Hi,

I can’t tell you whether it’s right or not. :slight_smile:

If you curl the URL from a build agent, do you get a 200 response?

 
Ann

Hi,

Yes I get a positive response when I execute the command from build agent. No error there.

Thanks.

Hi,

Then it looks like the URL is correct.

Now to figure out why there’s a problem when it’s accessed from analysis. For that, you should probably talk to your network folks.

 
HTH,
Ann