dpa
(dpa)
October 3, 2025, 12:17am
1
Must-share information (formatted with Markdown ):
which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension) - Sonarqube server
how is SonarQube deployed: zip, Docker, Helm - zip
what are you trying to achieve - job execution using
what have you tried so far to achieve this - Reverted back to 4.3.0 with command npx @sonar/scan@4.3.0 and it works fine.
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!
$ npx @sonar/scan -Dsonar.projectKey=REDACT -Dsonar.sources=REDACT -Dsonar.host.url=REDACT -Dsonar.token=REDACT REDACT
npm warn exec The following package was not found and will be installed: @sonar/scan@4.3.2
[INFO] Bootstrapper: Retrieving info from "package.json" file
[INFO] Bootstrapper: Platform: linux x64
[INFO] Bootstrapper: Server URL: https://sonarqube.REDACT
[INFO] Bootstrapper: Version: 4.3.2
[INFO] Bootstrapper: SonarQube server version: 2025.4.2
[INFO] Bootstrapper: JRE provisioning is supported
[INFO] Bootstrapper: Using JRE from the cache
node:events:486
throw er; // Unhandled 'error' event
^
Error: spawn /builds/REDACT/.sonar/cache/4086cc7cb2d9e7810141f255063caad10a8a018db5e6b47fa5394c506ab65bff/OpenJDK17U-jre_x64_linux_hotspot_17.0.13_11.tar.gz_extracted/jdk-17.0.13+11-jre/bin/java ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:292:12)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn /builds/REDACT/.sonar/cache/4086cc7cb2d9e7810141f255063caad10a8a018db5e6b47fa5394c506ab65bff/OpenJDK17U-jre_x64_linux_hotspot_17.0.13_11.tar.gz_extracted/jdk-17.0.13+11-jre/bin/java',
path: '/builds/REDAT/.sonar/cache/4086cc7cb2d9e7810141f255063caad10a8a018db5e6b47fa5394c506ab65bff/OpenJDK17U-jre_x64_linux_hotspot_17.0.13_11.tar.gz_extracted/jdk-17.0.13+11-jre/bin/java',
spawnargs: [
'-jar',
'/builds/REDACT/.sonar/cache/8a653d8f165c86c3f79effd11c5a4b096c7d2f48f01c4078c72287f3a7ab61dc/scanner-enterprise-2025.4.2.112048-all.jar'
]
}
Node.js v24.9.0
Jobs started failing continuously after 9/23/2025. The cache file was created using 4.3.0 and now since npm package version 4.3.1, it has started failing with above error.
Maybe similar probably to Sonar-scanner-6.2.1.4610-linux error ENOENT .
Hi @dpa ,
can you please enable debug logs? Also, can you please remove the cache path and retry?
Cheers
dpa
(dpa)
October 3, 2025, 6:13pm
5
Thanks Victor for replying. I assume debug logs mean npx level logs. If something else do let me know. This is my production instance so if you are asking to enable debug logs on sonar server side then it is not possible. Cache file gets created in S3 bucket.
$ npx --loglevel verbose @sonar/scan <same command as before>
npm verbose cli /usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js
npm info using npm@11.6.0
npm info using node@v24.9.0
npm verbose logfile logs-max:10 dir:/root/.npm/_logs/2025-10-03T17_53_26_746Z-
npm verbose logfile /root/.npm/_logs/2025-10-03T17_53_26_746Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/@sonar%2fscan 157ms (cache miss)
npm warn exec The following package was not found and will be installed: @sonar/scan@4.3.2
npm http fetch GET 200 https://registry.npmjs.org/@sonar%2fscan 64ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/adm-zip 53ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/fs-extra 70ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/hpagent 77ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/axios 103ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/proxy-from-env 109ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/commander 117ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/node-forge 124ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/semver 127ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/tar-stream 128ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/properties-file 133ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/slugify 138ms (cache miss)
npm http cache https://registry.npmjs.org/proxy-from-env 11ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/follow-redirects 33ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/fast-fifo 40ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/universalify 42ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/form-data 46ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/graceful-fs 52ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/jsonfile 62ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/streamx 66ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/b4a 83ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/combined-stream 27ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/mime-types 32ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/es-set-tostringtag 37ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/asynckit 53ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/hasown 63ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/delayed-stream 34ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/mime-db 35ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/function-bind 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/has-tostringtag 44ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/es-errors 46ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/get-intrinsic 224ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/gopd 27ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/get-proto 37ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/es-object-atoms 37ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/has-symbols 38ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/math-intrinsics 39ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/call-bind-apply-helpers 43ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/has-symbols 51ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/es-define-property 73ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/dunder-proto 30ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/react-native-b4a 29ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/react 212ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/react-native 271ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@types%2freact 57ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/text-decoder 51ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/events-universal 72ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/bare-events 24ms (cache miss)
npm http cache bare-events@https://registry.npmjs.org/bare-events/-/bare-events-2.7.0.tgz 0ms (cache hit)
npm http cache text-decoder@https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz 0ms (cache hit)
npm http cache streamx@https://registry.npmjs.org/streamx/-/streamx-2.23.0.tgz 0ms (cache hit)
npm http cache fast-fifo@https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz 0ms (cache hit)
npm http cache b4a@https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz 0ms (cache hit)
npm http cache mime-db@https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz 0ms (cache hit)
npm http cache events-universal@https://registry.npmjs.org/events-universal/-/events-universal-1.0.1.tgz 0ms (cache hit)
npm http cache dunder-proto@https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz 0ms (cache hit)
npm http cache math-intrinsics@https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz 0ms (cache hit)
npm http cache has-symbols@https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz 0ms (cache hit)
npm http cache gopd@https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz 0ms (cache hit)
npm http cache function-bind@https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz 0ms (cache hit)
npm http cache get-proto@https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz 0ms (cache hit)
npm http cache es-object-atoms@https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz 0ms (cache hit)
npm http cache call-bind-apply-helpers@https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz 0ms (cache hit)
npm http cache jsonfile@https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz 0ms (cache hit)
npm http cache graceful-fs@https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz 0ms (cache hit)
npm http cache has-tostringtag@https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz 0ms (cache hit)
npm http cache universalify@https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz 0ms (cache hit)
npm http cache get-intrinsic@https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz 0ms (cache hit)
npm http cache es-errors@https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz 0ms (cache hit)
npm http cache delayed-stream@https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz 0ms (cache hit)
npm http cache mime-types@https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz 0ms (cache hit)
npm http cache hasown@https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz 0ms (cache hit)
npm http cache es-define-property@https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz 0ms (cache hit)
npm http cache es-set-tostringtag@https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz 0ms (cache hit)
npm http cache combined-stream@https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz 0ms (cache hit)
npm http cache asynckit@https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz 0ms (cache hit)
npm http cache form-data@https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz 0ms (cache hit)
npm http cache follow-redirects@https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz 0ms (cache hit)
npm http cache slugify@https://registry.npmjs.org/slugify/-/slugify-1.6.6.tgz 0ms (cache hit)
npm http cache tar-stream@https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz 0ms (cache hit)
npm http cache semver@https://registry.npmjs.org/semver/-/semver-7.7.2.tgz 0ms (cache hit)
npm http cache properties-file@https://registry.npmjs.org/properties-file/-/properties-file-3.6.1.tgz 1ms (cache hit)
npm http cache proxy-from-env@https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz 0ms (cache hit)
npm http cache node-forge@https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz 0ms (cache hit)
npm http cache hpagent@https://registry.npmjs.org/hpagent/-/hpagent-1.2.0.tgz 0ms (cache hit)
npm http cache fs-extra@https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz 0ms (cache hit)
npm http cache commander@https://registry.npmjs.org/commander/-/commander-13.1.0.tgz 0ms (cache hit)
npm http cache axios@https://registry.npmjs.org/axios/-/axios-1.12.2.tgz 0ms (cache hit)
npm http cache adm-zip@https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.16.tgz 0ms (cache hit)
npm http cache @sonar/scan@https://registry.npmjs.org/@sonar/scan/-/scan-4.3.2.tgz 0ms (cache hit)
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 153ms
npm http fetch GET 200 https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz 143ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/events-universal/-/events-universal-1.0.1.tgz 153ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz 154ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz 162ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/bare-events/-/bare-events-2.7.0.tgz 177ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz 174ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz 177ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/streamx/-/streamx-2.23.0.tgz 180ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz 178ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz 182ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz 188ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz 193ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz 198ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz 200ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz 199ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz 201ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz 207ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz 208ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz 206ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz 212ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz 206ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz 211ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz 208ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz 217ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/slugify/-/slugify-1.6.6.tgz 208ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz 210ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz 216ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz 215ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/properties-file/-/properties-file-3.6.1.tgz 213ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz 224ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz 216ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz 231ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz 226ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz 237ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/hpagent/-/hpagent-1.2.0.tgz 234ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.16.tgz 244ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sonar/scan/-/scan-4.3.2.tgz 246ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz 253ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/commander/-/commander-13.1.0.tgz 258ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/semver/-/semver-7.7.2.tgz 265ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz 291ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/axios/-/axios-1.12.2.tgz 297ms (cache miss)
[INFO] Bootstrapper: Retrieving info from "package.json" file
[INFO] Bootstrapper: Platform: linux x64
[INFO] Bootstrapper: Server URL: https://sonarqube.REDACT
[INFO] Bootstrapper: Version: 4.3.2
[INFO] Bootstrapper: SonarQube server version: 2025.4.2
[INFO] Bootstrapper: JRE provisioning is supported
[INFO] Bootstrapper: Using JRE from the cache
node:events:486
throw er; // Unhandled 'error' event
^
Error: spawn /builds/REDACT/.sonar/cache/4086cc7cb2d9e7810141f255063caad10a8a018db5e6b47fa5394c506ab65bff/OpenJDK17U-jre_x64_linux_hotspot_17.0.13_11.tar.gz_extracted/jdk-17.0.13+11-jre/bin/java ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:292:12)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn /builds/REDACT/.sonar/cache/4086cc7cb2d9e7810141f255063caad10a8a018db5e6b47fa5394c506ab65bff/OpenJDK17U-jre_x64_linux_hotspot_17.0.13_11.tar.gz_extracted/jdk-17.0.13+11-jre/bin/java',
path: '/builds/REDACT/.sonar/cache/4086cc7cb2d9e7810141f255063caad10a8a018db5e6b47fa5394c506ab65bff/OpenJDK17U-jre_x64_linux_hotspot_17.0.13_11.tar.gz_extracted/jdk-17.0.13+11-jre/bin/java',
spawnargs: [
'-jar',
'/builds/REDACT/.sonar/cache/8a653d8f165c86c3f79effd11c5a4b096c7d2f48f01c4078c72287f3a7ab61dc/scanner-enterprise-2025.4.2.112048-all.jar'
]
}
Node.js v24.9.0
npm verbose cwd /builds/REDACT
npm verbose os Linux 6.1.147-172.266.amzn2023.x86_64
npm verbose node v24.9.0
npm verbose npm v11.6.0
npm verbose exit 1
npm verbose code 1
I previously attempted changing the cache key, which led to the creation of a new cache file since the old one was missing. As a result, the operation would always succeed on subsequent retries. However, with the current design, this approach isn’t feasible at an enterprise scale because multiple pipelines still rely on their existing caches. Additionally, there is currently no mechanism for cache expiry
In summary
If I hard code version to 4.3.0 for sonar scan it can read cache file and it works.
If I change cache key to something else, it works but mostly not possible to do on enterprise level.
If cache file gets created with latest 4.3.1 or 4.3.2 then it always works.
Hi @dpa ,
I meant debug logs for the scanner, you can enable them with -X parameter.
The issue is that the expected extract path for the JRE did change, so new version is using the new expected output path, but your existing path was created with previous version. If you can change the contents of the cache moving the _unzip path to _extracted, that would solve the issue. You can see the offending change here
1 Like