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’
    inputs:
    SonarQube: SonarQube
    scannerMode: MSBuild
    projectKey: $(ProjectId)

DotNetCoreCLI build

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

SonarQube analyze

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

SonarQube Publish

  • task: SonarQubePublish@5
    inputs:
    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.

Thanks.

I missed this part of your original post.

Do you see anything in the SonarQube logs about this?

I do not

Which logs might be most useful?

I’m continuing to see this behavior - certain SQ runs cause the system to become unresponsive.

Hoping someone can assist.

I think that given the symptoms, the analysis logs (the output of running the scanner which ends with a report being submitted to the SonarQube server) from both runs (one which can’t upload the report and causes SonarQube to become unavailable, and one which is successful) would be useful to compare what could be different about these reports.

I’ve upgraded to SQ 10.1
I’ve moved SQ to a new Windows 2022 server
The crashes continue.

At this point I’m seriously considering not renewing the subscription. The software crashes daily or more.

Right now when I visit the internal URL for SQ, I get a 502 error. When I run SonarService.bat status, it returns ‘Started’.

When I look at sonar.log, the last entry is from yesterday ‘SonarQube is operational’.

I can recover if I reboot or if I do this:

restart-service sonarqube
restart-service w3svc
iisreset

@Colin - I will try to recover the system and replicate the issue such that I can provide some actionable information.

@Colin - I have identified the pipeline which causes the failure.

This is a C# project. It builds and the ‘Run Code Analysis’ step runs for 8m 5s before it dies. The pipeline is running on Azure Devops Server via the SonarQube ADO extension (ver 5.15.0).

Is there a way I can provide log data to you directly?

This really sounds like an issue at the IIS layer.

I’ll open a private message.