Chapter 02Lesson 04~120 minutes

SonarQube Product Model, Editions, Components, and Architecture: Diagnostics, Failure Modes, and Production Practices

Diagnose scanner, task, persistence/search, policy, provider, IDE, and edition failures by preserving first-failure evidence and proving the last successful ownership boundary.

DiagnosticsBackground tasksEdition mismatchFailure isolationProduction

Learning objectives

  • Apply an evidence-first diagnostic sequence from source/scanner through external provider.
  • Separate scanner/runtime, auth/network, CE, database/search, policy, and integration failures.
  • Diagnose product/edition mismatches without hiding them with plugins or policy changes.
  • Preserve task IDs/logs before retries or cleanup.
  • Apply the least destructive correction and rerun the same scenario.

1. “SonarQube failed” is not a diagnosis

A missing scanner executable is a client/runtime problem. HTTP 401/403 during upload is authentication/authorization. An accepted report with a failed Compute Engine task is server processing. A completed analysis with a red gate is policy outcome. A green server result with missing PR decoration is usually an external integration/provider problem.

Invariant: preserve evidence, identify the last proven state, then inspect the next boundary. Do not restart everything.

2. Evidence-first sequence

  1. Preserve scanner output, task metadata, CE response/logs, CI log, provider status, API responses.
  2. Confirm exact product/edition/version plus scanner/runtime/plugin/database/integration versions relevant to the symptom.
  3. Confirm revision, project key, effective parameters, and token/permission scope.
  4. Prove report creation/upload and task identity.
  5. Prove CE state and first failure.
  6. Prove project/profile/New Code/gate result.
  7. Prove CI/provider/PR integration state.
  8. Inspect database/search/JVM/host/container only if prior evidence points there.
  9. Correct narrowly and rerun the smallest equivalent case.

3. Broken example: upload success mistaken for analysis success

scanner: report uploaded
ceTaskId=AX-example-123
server task: FAILED
analysis result: not completed

The client succeeded in upload, but the analysis did not complete. Preserve the task/error and repair the server-side cause. Re-run the same revision/inputs; do not change project key to make a new green history.

4. Broken example: edition assumption

A team copies a commercial branch/PR setup into Community Build and blames the scanner. First prove product identity and current feature matrix. If the capability is commercial, evaluate the appropriate licensed edition, redesign around Community capabilities, or simulate it for training. Do not install unverified plugins or spoof license state.

5. Broken example: IDE treated as authoritative

The IDE shows no findings while CI/server gate is red. Compare revision, scope, connected configuration, imported reports, and server policy. The IDE can legitimately have a different local context. Do not lower the server gate to match a workstation.

6. Broken example: Cloud and Server configuration mixed

A migration attempts to carry a self-managed sonar.properties infrastructure setting into SonarQube Cloud. Reclassify each setting: project/organization/integration behavior may have a Cloud equivalent; self-managed process/database/search settings do not belong to the hosted infrastructure plane.

7. Failure-layer table

Symptom First layer Evidence Avoid
Scanner cannot start scanner/runtime version/JRE/local error restart server
401/403 upload auth/permission HTTP status/token scope admin token everywhere
Upload accepted, task failed Compute Engine ceTaskId/CE log blind reruns
Analysis exists, gate red policy gate conditions/measures/New Code lower threshold
Gate green, PR missing provider/integration provider permissions/status new project key
UI/search unhealthy search/JVM/host supported health/log/resource data delete index blindly
Feature absent product/edition/version current matrix + product identity random plugin

8. Database/search production boundary

Never directly edit SonarQube database rows or search documents as a troubleshooting shortcut. Preserve logs/health evidence and follow current supported backup/recovery/update guidance. Likewise, do not delete logs or caches before capturing first failure.

9. Security-sensitive diagnostics

  • Least-privilege tokens; redact secrets.
  • No TLS-verification disablement as a connectivity shortcut.
  • No public exposure of database/search/cluster ports.
  • No identity bypass to “prove” integration.
  • No unsupported downgrade or incompatible restore.
  • No broad project deletion or mass suppression to make CI green.

10. Production incident packet

revision X + scanner Y uploaded task Z → CE state/error at T → project/policy/provider consequence → correction C applied at layer L → same revision/input rerun as Z2

Attach the redacted architecture manifest, effective parameters, scanner log, task identity, CE status/error, relevant server log, policy evidence, provider/CI status, and the exact correction.

Knowledge check

Scanner exits 0 but CE is FAILED. What is the incident?

A feature is missing in Community Build. First check?

Why is changing project key a bad shortcut?

When should you inspect database/search health?

IDE and server disagree. Which governs CI release policy?

Next lesson

Build the architecture dossier

Lesson 5 combines execution, edition mapping, failure diagnosis, and evidence governance.

Official references and version notes

Version and edition note

Rechecked 2026-09-07. The mandatory lab path uses Community Build 26.9.0.129388. SonarQube Server Developer, Enterprise, and Data Center editions are on 2026 Release 4.1, while 2026.1.5 is the active LTA patch line. Scanner/JRE provisioning, language support, APIs, plugins, and edition capabilities evolve independently; re-check current primary documentation before applying this snapshot.

Version and compatibility note

SonarQube product names, editions, release trains, scanner runtimes, APIs, authentication options, and platform prerequisites can change independently. Re-check the linked SonarSource primary documentation for the exact target release before applying version-sensitive commands or operational guidance outside the disposable course environment.

Keep the academy open

Support free, practical DevOps education.

Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.

Ethereum / ERC-20
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0Send only Ethereum/ERC-20 compatible assets to this address.