[hermes] bstein-dev-home #576: sonarqube_nodejs_missing #808

Open
opened 2026-10-02 21:41:53 +00:00 by hermes-automation · 0 comments

Hermes auto-triage classified incident bstein-dev-home/576 as sonarqube_nodejs_missing (confidence 0.6); first failed gate: sonarqube.

Why a human is needed

Build #576 failed in the stage named 'Publish test metrics', which runs after the test suites and handles the SonarQube scan plus metrics publishing. The backend Python suite itself is fine: all 128 tests passed and coverage/JUnit artifacts were written. The concrete error in the logs happened inside the SonarQube scan: its JavaScript/TypeScript analyzer tried to run 'node -v' to start, and failed with 'Cannot run program "node": error=2, No such file or directory' — the Node.js runtime it depends on simply isn't present in the environment the scan ran in. That error is immediately followed, later in the log, by the pipeline exiting with status 1 and skipping the backend build/push stage (and presumably the frontend one too), so no release assets were published for this build. This isn't a bug in your application code or tests — the test suite ran and passed — it's a gap in the CI environment for the Sonar step. The fix is to make sure Node.js is actually installed and on PATH in whatever image/container runs the SonarQube scan (or, if JS/TS analysis isn't meant to run there, turn that sensor off in the Sonar configuration). One caveat: the centralized log lookup for this build window couldn't be reached (connection refused), so this conclusion is based on the Jenkins console output alone rather than being cross-checked against another log source.

Ariadne did not authorize automated remediation: classification_not_supported: 'sonarqube_nodejs_missing'.

Facts

  • jenkins — Jenkins build bstein-dev-home #576 result is FAILURE, and Jenkins reported the first failed stage as 'Publish test metrics'. (jenkins.result, jenkins.first_failed_stage)
  • jenkins — During the SonarQube scan, the JavaScript analysis sensor threw NodeCommandException: "Error when running: 'node -v'. Is Node.js available during analysis?", caused by java.io.IOException: Cannot run program "node": error=2, No such file or directory. (jenkins.console_failures[0] line 322 and console_failures[1] line 358)
  • jenkins — The backend Python test suite ran and passed in full: '128 passed in 14.86s', with JUnit XML and coverage XML written successfully (backend_rc=0). (jenkins.console_failures[2] line 683)
  • jenkins — jenkins.failed_tests is an empty array, i.e. the build published no structured failing-test records. (jenkins.failed_tests)
  • jenkins — After the failure, 'Build & push backend' was skipped due to earlier failure(s), the Post Actions block ran, and the pipeline ended with 'ERROR: script returned exit code 1' followed by 'do not publish assets due to build being non-Successfully' and 'Finished: FAILURE'. (jenkins.console_tail)
  • opensearch — The OpenSearch log correlation query for this incident's time window returned no records; the request failed with 'Connection refused'. (log_evidence.error)

Evidence

The earliest failure region of the build console:

21:28:37.087 INFO  Sensor JaCoCo XML Report Importer [jacoco] (done) | time=3ms
21:28:37.087 INFO  Sensor IaC CloudFormation Sensor [iac]
21:28:37.303 INFO  0 source files to be analyzed
21:28:37.359 INFO  0/0 source files have been analyzed
21:28:37.360 INFO  Sensor IaC CloudFormation Sensor [iac] (done) | time=273ms
21:28:37.360 INFO  Sensor IaC Kubernetes Sensor [iac]
21:28:37.412 INFO  0 source files to be analyzed
21:28:37.500 INFO  0/0 source files have been analyzed
21:28:37.500 INFO  Sensor IaC Kubernetes Sensor [iac] (done) | time=140ms
21:28:37.500 INFO  Sensor JavaScript analysis [javascript]
21:28:41.427 ERROR Error when running: 'node -v'. Is Node.js available during analysis?
org.sonarsource.nodejs.NodeCommandException: Error when running: 'node -v'. Is Node.js available during analysis?
	at org.sonarsource.nodejs.NodeCommand.start(NodeCommand.java:79)
	at org.sonarsource.nodejs.NodeCommandBuilderImpl.getVersion(NodeCommandBuilderImpl.java:203)
	at org.sonarsource.nodejs.NodeCommandBuilderImpl.checkNodeCompatibility(NodeCommandBuilderImpl.java:169)
	at org.sonarsource.nodejs.NodeCommandBuilderImpl.build(NodeCommandBuilderImpl.java:143)
	at org.sonar.plugins.javascript
... (truncated; the full log is in the linked build)

Inferences

  • The build agent/container used for the quality-metrics/SonarQube step appears to lack a working Node.js binary on PATH, which is what the sonar-scanner's JS/TS sensor needs; this looks like a CI build-image gap rather than an application code or test defect, since the backend test suite itself ra...
  • The pipeline's final 'exit code 1' most plausibly traces back to this scanner error surfacing inside the 'Publish test metrics' stage (where the Sonar analysis is submitted and/or its quality-gate result is awaited), causing that stage — and therefore the whole build — to be marked failed and the...
  • Because the OpenSearch log correlation could not be queried (connection refused), there is no independent centralized-log corroboration for this build window; this assessment rests on the Jenkins console text alone, so a residual chance remains that a different, uncaptured error later in the (tru...

Suggested remediation (not available)

No automated remediation exists for this failure. Hermes proposes one; it was not performed, and Ariadne cannot perform it until a person builds and deploys it.

  • Proposed action: ensure_nodejs_in_sonar_scanner_image
  • What it would do: Make sure the build image/container used for the SonarQube scan step has a working Node.js binary on PATH (or, if JS/TS analysis isn't actually wanted there, configure the scanner to skip the JavaScript/TypeScript sensor) so the sensor can launch 'node -v' successfully.
  • Evidence that should be required first: The same NodeCommandException / "Cannot run program node" error recurring across multiple builds of this job (ruling out a one-off scheduling fluke), and confirmation that the repository does contain JS/TS sources intended to be scanned by this Sonar analysis.

Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_65ac83556f4a4b879c25f043ec3cbe6e). Hermes has no write access to this repository; no files or infrastructure were changed.

Hermes auto-triage classified incident `bstein-dev-home/576` as **sonarqube_nodejs_missing** (confidence 0.6); first failed gate: `sonarqube`. ## Why a human is needed Build #576 failed in the stage named 'Publish test metrics', which runs after the test suites and handles the SonarQube scan plus metrics publishing. The backend Python suite itself is fine: all 128 tests passed and coverage/JUnit artifacts were written. The concrete error in the logs happened inside the SonarQube scan: its JavaScript/TypeScript analyzer tried to run 'node -v' to start, and failed with 'Cannot run program "node": error=2, No such file or directory' — the Node.js runtime it depends on simply isn't present in the environment the scan ran in. That error is immediately followed, later in the log, by the pipeline exiting with status 1 and skipping the backend build/push stage (and presumably the frontend one too), so no release assets were published for this build. This isn't a bug in your application code or tests — the test suite ran and passed — it's a gap in the CI environment for the Sonar step. The fix is to make sure Node.js is actually installed and on PATH in whatever image/container runs the SonarQube scan (or, if JS/TS analysis isn't meant to run there, turn that sensor off in the Sonar configuration). One caveat: the centralized log lookup for this build window couldn't be reached (connection refused), so this conclusion is based on the Jenkins console output alone rather than being cross-checked against another log source. Ariadne did not authorize automated remediation: `classification_not_supported: 'sonarqube_nodejs_missing'`. ## Facts - **jenkins** — Jenkins build bstein-dev-home #576 result is FAILURE, and Jenkins reported the first failed stage as 'Publish test metrics'. (`jenkins.result, jenkins.first_failed_stage`) - **jenkins** — During the SonarQube scan, the JavaScript analysis sensor threw NodeCommandException: "Error when running: 'node -v'. Is Node.js available during analysis?", caused by java.io.IOException: Cannot run program "node": error=2, No such file or directory. (`jenkins.console_failures[0] line 322 and console_failures[1] line 358`) - **jenkins** — The backend Python test suite ran and passed in full: '128 passed in 14.86s', with JUnit XML and coverage XML written successfully (backend_rc=0). (`jenkins.console_failures[2] line 683`) - **jenkins** — jenkins.failed_tests is an empty array, i.e. the build published no structured failing-test records. (`jenkins.failed_tests`) - **jenkins** — After the failure, 'Build & push backend' was skipped due to earlier failure(s), the Post Actions block ran, and the pipeline ended with 'ERROR: script returned exit code 1' followed by 'do not publish assets due to build being non-Successfully' and 'Finished: FAILURE'. (`jenkins.console_tail`) - **opensearch** — The OpenSearch log correlation query for this incident's time window returned no records; the request failed with 'Connection refused'. (`log_evidence.error`) ## Evidence The earliest failure region of the build console: ``` 21:28:37.087 INFO Sensor JaCoCo XML Report Importer [jacoco] (done) | time=3ms 21:28:37.087 INFO Sensor IaC CloudFormation Sensor [iac] 21:28:37.303 INFO 0 source files to be analyzed 21:28:37.359 INFO 0/0 source files have been analyzed 21:28:37.360 INFO Sensor IaC CloudFormation Sensor [iac] (done) | time=273ms 21:28:37.360 INFO Sensor IaC Kubernetes Sensor [iac] 21:28:37.412 INFO 0 source files to be analyzed 21:28:37.500 INFO 0/0 source files have been analyzed 21:28:37.500 INFO Sensor IaC Kubernetes Sensor [iac] (done) | time=140ms 21:28:37.500 INFO Sensor JavaScript analysis [javascript] 21:28:41.427 ERROR Error when running: 'node -v'. Is Node.js available during analysis? org.sonarsource.nodejs.NodeCommandException: Error when running: 'node -v'. Is Node.js available during analysis? at org.sonarsource.nodejs.NodeCommand.start(NodeCommand.java:79) at org.sonarsource.nodejs.NodeCommandBuilderImpl.getVersion(NodeCommandBuilderImpl.java:203) at org.sonarsource.nodejs.NodeCommandBuilderImpl.checkNodeCompatibility(NodeCommandBuilderImpl.java:169) at org.sonarsource.nodejs.NodeCommandBuilderImpl.build(NodeCommandBuilderImpl.java:143) at org.sonar.plugins.javascript ... (truncated; the full log is in the linked build) ``` ## Inferences - The build agent/container used for the quality-metrics/SonarQube step appears to lack a working Node.js binary on PATH, which is what the sonar-scanner's JS/TS sensor needs; this looks like a CI build-image gap rather than an application code or test defect, since the backend test suite itself ra... - The pipeline's final 'exit code 1' most plausibly traces back to this scanner error surfacing inside the 'Publish test metrics' stage (where the Sonar analysis is submitted and/or its quality-gate result is awaited), causing that stage — and therefore the whole build — to be marked failed and the... - Because the OpenSearch log correlation could not be queried (connection refused), there is no independent centralized-log corroboration for this build window; this assessment rests on the Jenkins console text alone, so a residual chance remains that a different, uncaptured error later in the (tru... ## Suggested remediation (not available) No automated remediation exists for this failure. Hermes proposes one; it was not performed, and Ariadne cannot perform it until a person builds and deploys it. - Proposed action: `ensure_nodejs_in_sonar_scanner_image` - What it would do: Make sure the build image/container used for the SonarQube scan step has a working Node.js binary on PATH (or, if JS/TS analysis isn't actually wanted there, configure the scanner to skip the JavaScript/TypeScript sensor) so the sensor can launch 'node -v' successfully. - Evidence that should be required first: The same NodeCommandException / "Cannot run program node" error recurring across multiple builds of this job (ruling out a one-off scheduling fluke), and confirmation that the repository does contain JS/TS sources intended to be scanned by this Sonar analysis. ## Links - Failed build: https://ci.bstein.dev/job/bstein-dev-home/576/ - Full evidence bundle and audit trail live in Ariadne at `/api/admin/audit/events`, event types `hermes_autotriage_incident` and `hermes_autotriage_diagnosis`. Filed automatically by Ariadne from a Hermes Agent diagnosis (run [run_65ac83556f4a4b879c25f043ec3cbe6e](https://triage.bstein.dev/chat?resume=run_65ac83556f4a4b879c25f043ec3cbe6e)). Hermes has no write access to this repository; no files or infrastructure were changed. <!-- hermes-triage job=bstein-dev-home classification=sonarqube_nodejs_missing incident=bstein-dev-home/576 -->
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bstein/bstein-dev-home#808
No description provided.