Sonarqube Scan crashes

I have a repeatable issue on SQ 10.0 running on Windows 2019 Server with IIS as the reverse proxy (for TLS support)

My pipeline is Azure Devops Server 2022

My build config (without Sonarqube) works fine

When I add the Sonarqube tasks:

SonarQube Prepare

  • task: SonarQubePrepare@5
    displayName: ‘Prepare analysis on SonarQube’
    SonarQube: SonarQube
    scannerMode: MSBuild
    projectKey: $(ProjectId)

DotNetCoreCLI build

  • task: DotNetCoreCLI@2
    command: ‘build’
    configuration: $(BuildConfiguration)

SonarQube analyze

  • task: SonarQubeAnalyze@5
    displayName: ‘Run Code Analysis’

SonarQube Publish

  • task: SonarQubePublish@5
    pollingTimeoutSec: 300

It fails every time at Run Code Analaysis task because it can’t upload the report. Once this fails, Sonarqube becomes unavailable. The SQ service is still running but it not accessible via the web UI. Even the local port 9000 won’t respond.

To recover, I have to restart sonarqube, W3SVC, and do an IIS reset.

Even more strangely, if I configure the pipeline via the classic method (not YAML) - it doesn’t hapen.

Suggestions welcome.

That is strange! Are you absolutely sure that when configuring via YAML, you are targeting the same build agent?

Pretty sure - we only use onprem agents for Azure Devops Server - and I only have 2.


I missed this part of your original post.

Do you see anything in the SonarQube logs about this?