Chapter 26Lesson 04~135 minutes

Marketplace, Plugins, Extension Risks, and Compatibility Management: Diagnostics, Failure Modes, and Production Practices

Diagnose plugin and extension failures from preserved artifact, startup, compatibility, dependency, and cluster evidence instead of deleting logs, editing the database, or blindly downgrading the server.

PluginsSupply chainCompatibilityRollbackOperations

Learning objectives

  • Diagnose plugin failures from artifact, compatibility, startup, scanner, Compute Engine, and cluster evidence in the correct order.
  • Preserve the first failure before removing or replacing the extension.
  • Recognize abandoned-plugin, floating-version, dependency/license, and cluster-consistency failure modes.
  • Repair a deliberate checksum/provenance failure without weakening the integrity gate.
  • Recover a plugin-caused startup failure by changing only the introduced artifact, not database/search state.
  • Separate “server recovered” from “plugin capability validated” and from “project Quality Gate passed.”

1. Evidence-first diagnostic sequence

  1. Preserve artifact URL, exact JAR, SHA-256/signature evidence, manifest, license/source record, and change ticket.
  2. Preserve server version, Java/runtime, installed-plugin inventory, startup logs, and pre-change health.
  3. Confirm current compatibility matrix and plugin release documentation.
  4. Inspect whether the server reached UP after the deliberate restart.
  5. If startup succeeded, inspect web/CE/scanner plugin-loading logs and the exact extension capability.
  6. If an analysis ran, preserve scanner status, report-task.txt/ceTaskId, Compute Engine result, issues/measures/gate, and source revision.
  7. In Data Center, compare plugin file names/checksums on every application node before any node returns to service.
  8. Apply the least destructive correction: usually remove/replace only the newly introduced plugin artifact, then restart once and prove baseline recovery.

2. Failure: old tutorial recommends an abandoned plugin

The tutorial may be historically correct and operationally dangerous today. Check last release date, repository activity, issue tracker, current compatibility matrix, target Plugin API, and whether SonarQube now has a built-in or report-based alternative. An old release that “still downloads” is not evidence of support.

Do not solve abandonment with unsupported downgrade. Running an older SonarQube merely to keep an abandoned plugin alive can remove security fixes and create an unsupported server. Prefer removing/replacing the extension or staying on a currently supported target path.

3. Failure: “Marketplace lists it, so Sonar guarantees it”

Current documentation explicitly states that third-party plugins are not provided by Sonar and are installed at the operator’s own risk. Marketplace/version-matrix compatibility is useful, but the governance record still needs publisher/source, license, exact bytes/digest, maintenance state, dependency evidence, and rollback.

4. Failure: floating plugin versions

A deployment manifest that installs latest or downloads a mutable release URL cannot reproduce the server. Two restarts on different days might fetch different bytes. Pin the version and artifact URL, store/verify the expected digest, and retain a copy or artifact-store reference allowed by the plugin license.

BROKEN
plugins.install=https://publisher.example/plugin/latest/plugin.jar

REPAIRED MODEL
plugin_version=1.2.3
artifact=plugin-1.2.3.jar
url=https://publisher.example/releases/1.2.3/plugin-1.2.3.jar
sha256=<verified digest>

5. Intentionally broken example: checksum mismatch

This is the safest failure to engineer because it stops before executable server state changes. Preserve both values:

EXPECTED_SHA256="$(printf '0%.0s' {1..64})"  # deliberately wrong for lab only
ACTUAL_SHA256="$(sha256sum "$PLUGIN_JAR" | awk '{print $1}')"
printf 'expected=%s\nactual=%s\n' "$EXPECTED_SHA256" "$ACTUAL_SHA256" \
  | tee evidence/checksum-failure.txt

test "$EXPECTED_SHA256" = "$ACTUAL_SHA256" || {
  echo "BLOCKED: artifact integrity mismatch" | tee -a evidence/checksum-failure.txt
  exit 42
}

Interpretation: either the expected digest is wrong/stale, the download location served different bytes, or the file changed/corrupted. The repair is to return to the canonical publisher/release source, verify the exact expected artifact and digest, and redownload. Never replace the gate with --no-check.

6. Failure: server does not return after plugin installation

Preserve the complete startup logs before changing anything. A representative incompatibility can present as a plugin deployment/class-loading exception:

INFO  web[...] Deploy plugin Example / 1.2.3
ERROR web[...] Fail to start web server
... plugin API / class loading / missing dependency evidence ...

Do not assume every startup failure is the plugin; compare with the baseline. If the failure appeared immediately after introducing one verified JAR and the logs name that extension/API/dependency, the least destructive rollback is:

# Preserve first-failure evidence first.
docker logs sq-ch26 > evidence/failed-startup.log 2>&1

# Remove only the introduced artifact.
docker exec sq-ch26 rm -f "/opt/sonarqube/extensions/plugins/$PLUGIN_JAR"
docker restart sq-ch26
curl -fsS http://localhost:9026/api/system/status \
  | tee evidence/recovered-status.json

If baseline recovery succeeds, compatibility/plugin packaging is the primary investigation layer. If it does not, continue down host/database/search/resource diagnostics while preserving the original plugin evidence.

7. Failure: transitive dependency or license was ignored

A plugin can carry bundled libraries that never appear in the plugin display name. For open-source artifacts, compare source/build metadata, inspect the JAR, and preserve any SBOM/dependency tree supplied by the project. If a legal/security review finds an unacceptable dependency, uninstall/replace the plugin; do not strip classes from the JAR by hand, because that creates an unmaintained artifact with unknown runtime behavior.

8. Failure: Data Center application nodes differ

A mixed plugin set can route requests/tasks through different code depending on which application node receives them. Current Data Center guidance therefore requires the plugin operation on every application node and all application nodes stopped during install/uninstall/upgrade. Search nodes are a different role and do not receive application plugins.

# Illustrative inventory only; run through your authorized cluster tooling.
for node in app1 app2 app3; do
  ssh "$node" 'sha256sum /opt/sonarqube/extensions/plugins/*.jar' \
    > "evidence/${node}-plugins.sha256"
done
# Compare exact key/version/digest sets before restart.
Do not “repair” mismatch by copying random files node-to-node while the cluster is serving traffic. Schedule the coordinated plugin maintenance procedure and preserve each node’s pre-change inventory.

9. Failure: rollback artifact or baseline was lost

If you cannot reconstruct the previous plugin set, do not guess from filenames or a stale wiki. Recover from the approved artifact repository/change record/backups according to your operational process. The lesson’s preventive control is simple: preserve the pre-change inventory and exact approved plugin artifacts/digests before the change.

10. Causal layer map

Symptom Primary layer First evidence Least-destructive action
Checksum mismatch before install Artifact provenance Expected/actual digest + source URL Stop; verify publisher/release and redownload
Web process fails during plugin deploy Plugin/core/API/dependency Full startup logs + exact versions Remove introduced JAR; restart once; prove baseline
Server UP, scanner fails loading analyzer Scanner-side plugin dependency/language Scanner bootstrap log + plugin manifest Check base analyzer/required languages/current plugin release
CE task fails after successful upload Compute Engine extension ceTaskId + CE logs Preserve task; isolate plugin/CE compatibility
Different app nodes behave differently Data Center consistency Per-node plugin digests Coordinated maintenance to restore identical set

11. Production shortcuts to reject

  • Do not install an old plugin solely because a tutorial names it.
  • Do not treat a Marketplace listing as a security endorsement.
  • Do not use floating plugin versions or mutable download URLs.
  • Do not delete logs before preserving the first failure.
  • Do not remove the entire plugins directory because one extension fails.
  • Do not edit SonarQube database/search state to “unregister” a plugin.
  • Do not disable TLS verification to download artifacts.
  • Do not downgrade SonarQube outside supported paths to keep an abandoned plugin.
  • Do not install different JARs on Data Center application nodes.

Knowledge check

A checksum mismatch occurs. Is retrying the download repeatedly the right first fix?

The server is UP but a scan fails with a plugin class dependency error. Which layer is primary?

Should you delete all plugin JARs if one newly installed plugin prevents startup?

Why is losing the old plugin inventory a rollback risk?

Why is a Data Center plugin mismatch not just cosmetic?

Next lesson

Produce the plugin-governance checkpoint

Lesson 5 packages the full extension lifecycle into an auditable governance inventory and rollback record.

Official references and version notes

Version and compatibility note

Rechecked 2026-09-08. Mandatory examples target SonarQube Community Build 26.9.0.129388 using the official sonarqube:26.9.0.129388-community Docker image. Community Build supports Marketplace and manual plugin installation; current commercial SonarQube Server documentation requires manual installation. Third-party plugins are not provided by Sonar and are installed at the operator’s risk. Compatibility must be checked against the current Plugin version matrix and plugin release documentation before every install/upgrade. The checkpoint deliberately chooses the plugin at run time rather than hard-coding a third-party version that may become abandoned. The server image contains its supported Java runtime; outside the image, current Community Build 26.x requires Java 21+. No external database, production cluster, identity provider, reverse proxy, or paid capability is required. Data Center plugin consistency is taught as an optional/simulated commercial path.

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.