Sonar-scanner-npm fails writing temporary files when SONAR_USER_HOME is set

sonarqube-scanner 4.2.2 from sonarqube-scanner - npm

Using the NPM scanner fails when SONAR_USER_HOME is set, I think because it is failing to create the temporary directory to which plugins are downloaded. Reproduction steps, from a directory containing a project to analyze:

docker run -it -v .:/mnt node:20 sh
npm install -g sonarqube-scanner
export SONAR_TOKEN=[redacted]
export SONAR_USER_HOME=/mnt/.sonar

sonar-scanner

Downloading plugins fails, with the following log lines:

java.lang.IllegalStateException: Fail to create temp file in /mnt/.sonar/_tmp

Inspecting the file path, the _tmp directory does not exist within /mnt/.sonar, although there is a .sonar_lock file there, proving that permissions do allow the user to write to this directory.

This is a blocker for my CI/CD pipelines, where I need to ensure that Sonar output is written to the build directory so that it can be cached between runs.

Iā€™ve tried creating the _tmp directory manually, but the same error occurs, and inspecting the directory structure afterwards the directory no longer exists, suggesting it is cleaned up/removed before being written to.

Just to confirm that some premature cleanup/deletion seems to be causing this, maybe a race condition? Running with debug logging, I see the mandatory plugins downloaded correctly to _tmp:

[DEBUG] ScannerEngine: Create : /mnt/.sonar/_tmp
[DEBUG] ScannerEngine: User cache: /mnt/.sonar/cache
[INFO]  ScannerEngine: Loading required plugins
[INFO]  ScannerEngine: Load plugins index
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/plugins/installed
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/plugins/installed (325ms, unknown-length body)
[INFO]  ScannerEngine: Load plugins index (done) | time=351ms
[INFO]  ScannerEngine: Load/download plugins
[DEBUG] ScannerEngine: Download plugin 'iac' to '/mnt/.sonar/_tmp/fileCache1485692607641718308.tmp'

However, by the time we get to the detected plugins, this dir no longer exists:

[INFO]  ScannerEngine: Loading plugins for detected languages
[DEBUG] ScannerEngine: Detected languages: [js, json]
[INFO]  ScannerEngine: Load/download plugins
[INFO]  ScannerEngine: Load/download plugins (done) | time=1ms
[ERROR] ScannerEngine: Error during SonarScanner Engine execution
java.lang.IllegalStateException: Fail to create temp file in /mnt/.sonar/_tmp
        at org.sonar.scanner.bootstrap.PluginFiles.newTempFile(PluginFiles.java:126)

Running inotifywait -m -r /mnt/.sonar in a separate shell shows a deletion occurring:

/mnt/.sonar/ CREATE,ISDIR cache
/mnt/.sonar/ OPEN,ISDIR cache
/mnt/.sonar/ ACCESS,ISDIR cache
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR cache
/mnt/.sonar/ CREATE,ISDIR _tmp
/mnt/.sonar/ OPEN,ISDIR _tmp
/mnt/.sonar/ ACCESS,ISDIR _tmp
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR _tmp
/mnt/.sonar/ OPEN,ISDIR
/mnt/.sonar/ ACCESS,ISDIR
/mnt/.sonar/ ACCESS,ISDIR
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR
/mnt/.sonar/ CREATE,ISDIR .sonartmp_12069267450122649551
/mnt/.sonar/ OPEN,ISDIR .sonartmp_12069267450122649551
/mnt/.sonar/ ACCESS,ISDIR .sonartmp_12069267450122649551
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR .sonartmp_12069267450122649551
/mnt/.sonar/ OPEN .sonar_lock
/mnt/.sonar/ OPEN,ISDIR
/mnt/.sonar/ ACCESS,ISDIR
/mnt/.sonar/ OPEN,ISDIR .sonartmp_12069267450122649551
/mnt/.sonar/ ACCESS,ISDIR .sonartmp_12069267450122649551
/mnt/.sonar/ ACCESS,ISDIR .sonartmp_12069267450122649551
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR .sonartmp_12069267450122649551
/mnt/.sonar/ DELETE,ISDIR .sonartmp_12069267450122649551
/mnt/.sonar/ OPEN,ISDIR cache
/mnt/.sonar/ ACCESS,ISDIR cache
/mnt/.sonar/ OPEN,ISDIR
/mnt/.sonar/ ACCESS,ISDIR
/mnt/.sonar/ ACCESS,ISDIR
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR
/mnt/.sonar/ ACCESS,ISDIR cache
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR cache
/mnt/.sonar/ DELETE,ISDIR cache
/mnt/.sonar/ OPEN,ISDIR scanner-report
/mnt/.sonar/ ACCESS,ISDIR scanner-report
/mnt/.sonar/ ACCESS,ISDIR scanner-report
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR scanner-report
/mnt/.sonar/ DELETE,ISDIR scanner-report
/mnt/.sonar/ OPEN,ISDIR _tmp
/mnt/.sonar/ ACCESS,ISDIR _tmp
/mnt/.sonar/ ACCESS,ISDIR _tmp
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR _tmp
/mnt/.sonar/ DELETE,ISDIR _tmp
/mnt/.sonar/ ACCESS,ISDIR
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR
/mnt/.sonar/ CREATE,ISDIR .sonartmp
/mnt/.sonar/ OPEN,ISDIR .sonartmp
/mnt/.sonar/ ACCESS,ISDIR .sonartmp
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR .sonartmp
/mnt/.sonar/ CREATE,ISDIR scanner-report
/mnt/.sonar/ OPEN,ISDIR scanner-report
/mnt/.sonar/ ACCESS,ISDIR scanner-report
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR scanner-report
/mnt/.sonar/scanner-report/ CREATE analysis.log
/mnt/.sonar/scanner-report/ OPEN analysis.log
/mnt/.sonar/scanner-report/ MODIFY analysis.log
/mnt/.sonar/scanner-report/ CLOSE_WRITE,CLOSE analysis.log
/mnt/.sonar/ OPEN,ISDIR
/mnt/.sonar/ ACCESS,ISDIR
/mnt/.sonar/ ACCESS,ISDIR
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR
/mnt/.sonar/ OPEN,ISDIR .sonartmp
/mnt/.sonar/ ACCESS,ISDIR .sonartmp
/mnt/.sonar/ ACCESS,ISDIR .sonartmp
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR .sonartmp
/mnt/.sonar/ OPEN,ISDIR scanner-report
/mnt/.sonar/ ACCESS,ISDIR scanner-report
/mnt/.sonar/ ACCESS,ISDIR scanner-report
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR scanner-report
/mnt/.sonar/ OPEN,ISDIR
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR
/mnt/.sonar/ OPEN,ISDIR
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR
/mnt/.sonar/ OPEN,ISDIR .sonartmp
/mnt/.sonar/ ACCESS,ISDIR .sonartmp
/mnt/.sonar/ ACCESS,ISDIR .sonartmp
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR .sonartmp
/mnt/.sonar/ DELETE,ISDIR .sonartmp
/mnt/.sonar/ CLOSE_WRITE,CLOSE .sonar_lock
/mnt/.sonar/ OPEN,ISDIR
/mnt/.sonar/ ACCESS,ISDIR
/mnt/.sonar/ ACCESS,ISDIR
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR
/mnt/.sonar/ OPEN,ISDIR scanner-report
/mnt/.sonar/ ACCESS,ISDIR scanner-report
/mnt/.sonar/ ACCESS,ISDIR scanner-report
/mnt/.sonar/ CLOSE_NOWRITE,CLOSE,ISDIR scanner-report

Hi,

Iā€™ve got a few questions.

First, what version of SonarQube are you using? The latest version only downloads the analyzers necessary for the project under consideration, so that should significantly reduce any need for caching.

Second, are you certain itā€™s the scanner thatā€™s responsible for the deletions when you specify the home directory? But doesnā€™t delete when ā€˜homeā€™ is the default?

Third, out of curiosity, whatā€™s your build infrastructure?

 
Ann

Hi,

Let me try and answer some of these:

First: Iā€™m actually using SonarCloud, I should probably adjust the tags accordingly. That said - and Iā€™ll hit on this in reply to the second question - my minimal reproduction of the issue suggests pretty strongly that this is a problem on the scanner side and independent of Sonar[Qube|Cloud] version.

As to whether caching is needed or not: by setting SONAR_USER_HOME, my understanding is we cache not just the plugins but also parts of the analysis itself, and losing the ability to access that cache across multiple pipeline runs will have some performance impact. I agree it may not be overly significant, which is why my current workaround is to just write the cache to the default location, but it feels sub-optimal.

Second: Iā€™m pretty certain this is behavior from the scanner itself, as for reproduction steps Iā€™m running in a Docker container based on Node 20 with no other processes running: see the original post.

Third: our full build architecture is GitLab CI/CD pipelines running on Kubernetes. Sonarā€™s own guide to configuring this setup also includes setting SONAR_USER_HOME:

We were initially using the cli scanner, but Iā€™m experimenting with the NPM-based one, which is when this problem surfaced.

Does this help? Any suggestions for next steps?

Cheers,

Jack.

Hi Jack,

The analysis caching thatā€™s available happens automatically, server-side. Thereā€™s nothing you can or should do with regard to this. Unless youā€™re analyzing a CFamily language (which I assume is not the case since youā€™re trying out the NPM scanner).

What happens if you use the value recommended in the docs?

SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache

 
Ann

Using the value in the docs manifests the bug above: if I had to guess, what seems to happen is that the ā€œcompulsoryā€ plugins are downloaded to a _tmp subdirectory within that directory, then loaded from that location, then _tmp is cleaned up. In parallel, the project is analyzed and the language-specific plugins are downloaded to the same location, which is producing a race condition: if _tmp is removed, it is not recreated and the download of the language plugin fails.

It is strange that this problem does not manifest using the Sonar scanner CLI image, only when using the NPM scanner package: I donā€™t know how much of the logic is in which place, but hopefully that helps narrow it down.

Hi,

Can we have the full analysis log, starting from the analysis command itself, please?

 
Thx,
Ann

Sure thing, here it is in all its glory. This is the local reproduction detailed above:

# sonar-scanner -X > err.log
[INFO]  Bootstrapper: Retrieving info from "package.json" file
[DEBUG] Bootstrapper: Setting the log level to DEBUG due to verbose mode
[DEBUG] Bootstrapper: Properties: {
  'sonar.userHome': '/mnt/.sonar',
  'sonar.scanner.os': 'linux',
  'sonar.scanner.arch': 'x64',
  'sonar.exclusions': 'node_modules/**,bower_components/**,jspm_packages/**,typings/**,lib-cov/**',
  'sonar.projectKey': 'fabric2_lib-error',
  'sonar.projectName': 'lib-error',
  'sonar.projectVersion': '3.0.0',
  'sonar.links.homepage': 'https://gitlab.com/fabric2/libs/lib-error',
  'sonar.links.scm': 'git+ssh://git@gitlab.com:fabric2/libs/lib-error.git',
  'sonar.javascript.lcov.reportPaths': '.cicd/tests/lcov.info',
  'sonar.organization': 'fabric-gitlab',
  'sonar.qualitygate.wait': 'true',
  'sonar.sources': '.',
  'sonar.test.inclusions': '**/*.test.js',
  'sonar.testExecutionReportPaths': '.cicd/tests/results-sonar.xml',
  'sonar.tests': '.',
  'sonar.token': '39e82bd92f9b29acd5c32b27938fa9f773c63261',
  'sonar.verbose': 'true',
  'sonar.scanner.internal.isSonarCloud': 'true',
  'sonar.host.url': 'https://sonarcloud.io',
  'sonar.scanner.apiBaseUrl': 'https://api.sonarcloud.io',
  'sonar.scanner.app': 'ScannerNpm',
  'sonar.scanner.appVersion': '4.2.2',
  'sonar.scanner.bootstrapStartTime': '1726510031125',
  'sonar.scanner.wasJreCacheHit': 'disabled',
  'sonar.scanner.wasEngineCacheHit': 'false',
  'sonar.projectBaseDir': '/mnt'
}
[INFO]  Bootstrapper: Platform: linux x64
[DEBUG] Bootstrapper: Detecting proxy: No proxy detected
[INFO]  Bootstrapper: Server URL: https://sonarcloud.io
[INFO]  Bootstrapper: Version: 4.2.2
[DEBUG] Bootstrapper: Check if Server supports JRE provisioning
[INFO]  Bootstrapper: JRE provisioning is supported
[DEBUG] Bootstrapper: Detecting latest version of JRE
[DEBUG] Bootstrapper: Downloading JRE information for linux x64 from /analysis/jres
[DEBUG] Bootstrapper: Latest Supported JRE:  {
  filename: 'OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz',
  sha256: 'bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707',
  javaPath: 'jdk-17.0.11+9-jre/bin/java',
  os: 'linux',
  arch: 'x64',
  downloadUrl: 'https://scanner.sonarcloud.io/jres/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz'
}
[DEBUG] Bootstrapper: Looking for Cached JRE
[INFO]  Bootstrapper: No Cache found for JRE
[DEBUG] Bootstrapper: Creating Cache directory as it doesn't exist: /mnt/.sonar/cache/bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707
[DEBUG] Bootstrapper: Starting download of JRE
[DEBUG] Bootstrapper: Downloading https://scanner.sonarcloud.io/jres/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz to /mnt/.sonar/cache/bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz
[DEBUG] Bootstrapper: Not using axios instance for https://scanner.sonarcloud.io/jres/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz
[INFO]  Bootstrapper: Download starting...
[INFO]  Bootstrapper: Download complete
[INFO]  Bootstrapper: Downloaded JRE to /mnt/.sonar/cache/bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz
[DEBUG] Bootstrapper: Verifying checksum bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707
[DEBUG] Bootstrapper: Checksum Value: bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707
[DEBUG] Bootstrapper: Extracting /mnt/.sonar/cache/bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz to /mnt/.sonar/cache/bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz_extracted
[DEBUG] Bootstrapper: Detecting latest version of SonarScanner Engine
[DEBUG] Bootstrapper: Latest SonarScanner Engine version: sonarcloud-scanner-engine-11.2.0.186.jar
[DEBUG] Bootstrapper: Looking for Cached SonarScanner Engine
[INFO]  Bootstrapper: No Cache found for SonarScanner Engine
[DEBUG] Bootstrapper: Creating Cache directory as it doesn't exist: /mnt/.sonar/cache/bbd3f7735b40c4926dd12a05975fb025c479c8ca5baf65f67a3ef474b48bd4bc
[DEBUG] Bootstrapper: Starting download of SonarScanner Engine
[DEBUG] Bootstrapper: Downloading https://scanner.sonarcloud.io/engines/sonarcloud-scanner-engine-11.2.0.186.jar to /mnt/.sonar/cache/bbd3f7735b40c4926dd12a05975fb025c479c8ca5baf65f67a3ef474b48bd4bc/sonarcloud-scanner-engine-11.2.0.186.jar
[DEBUG] Bootstrapper: Not using axios instance for https://scanner.sonarcloud.io/engines/sonarcloud-scanner-engine-11.2.0.186.jar
[INFO]  Bootstrapper: Download starting...
[INFO]  Bootstrapper: Download complete
[INFO]  Bootstrapper: Downloaded SonarScanner Engine to /mnt/.sonar/cache/bbd3f7735b40c4926dd12a05975fb025c479c8ca5baf65f67a3ef474b48bd4bc/sonarcloud-scanner-engine-11.2.0.186.jar
[DEBUG] Bootstrapper: Verifying checksum bbd3f7735b40c4926dd12a05975fb025c479c8ca5baf65f67a3ef474b48bd4bc
[DEBUG] Bootstrapper: Checksum Value: bbd3f7735b40c4926dd12a05975fb025c479c8ca5baf65f67a3ef474b48bd4bc
[DEBUG] Bootstrapper: Running the SonarScanner Engine
[DEBUG] Bootstrapper: Detecting proxy: No proxy detected
[DEBUG] Bootstrapper: Running SonarScanner Engine /mnt/.sonar/cache/bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz_extracted/jdk-17.0.11+9-jre/bin/java -jar /mnt/.sonar/cache/bbd3f7735b40c4926dd12a05975fb025c479c8ca5baf65f67a3ef474b48bd4bc/sonarcloud-scanner-engine-11.2.0.186.jar
[DEBUG] Bootstrapper: Writing properties to SonarScanner Engine {"scannerProperties":[{"key":"sonar.userHome","value":"/mnt/.sonar"},{"key":"sonar.scanner.os","value":"linux"},{"key":"sonar.scanner.arch","value":"x64"},{"key":"sonar.exclusions","value":"node_modules/**,bower_components/**,jspm_packages/**,typings/**,lib-cov/**"},{"key":"sonar.projectKey","value":"fabric2_lib-error"},{"key":"sonar.projectName","value":"lib-error"},{"key":"sonar.projectVersion","value":"3.0.0"},{"key":"sonar.links.homepage","value":"https://gitlab.com/fabric2/libs/lib-error"},{"key":"sonar.links.scm","value":"git+ssh://git@gitlab.com:fabric2/libs/lib-error.git"},{"key":"sonar.javascript.lcov.reportPaths","value":".cicd/tests/lcov.info"},{"key":"sonar.organization","value":"fabric-gitlab"},{"key":"sonar.qualitygate.wait","value":"true"},{"key":"sonar.sources","value":"."},{"key":"sonar.test.inclusions","value":"**/*.test.js"},{"key":"sonar.testExecutionReportPaths","value":".cicd/tests/results-sonar.xml"},{"key":"sonar.tests","value":"."},{"key":"sonar.token","value":"39e82bd92f9b29acd5c32b27938fa9f773c63261"},{"key":"sonar.verbose","value":"true"},{"key":"sonar.scanner.internal.isSonarCloud","value":"true"},{"key":"sonar.host.url","value":"https://sonarcloud.io"},{"key":"sonar.scanner.apiBaseUrl","value":"https://api.sonarcloud.io"},{"key":"sonar.scanner.app","value":"ScannerNpm"},{"key":"sonar.scanner.appVersion","value":"4.2.2"},{"key":"sonar.scanner.bootstrapStartTime","value":"1726510031125"},{"key":"sonar.scanner.wasJreCacheHit","value":"miss"},{"key":"sonar.scanner.wasEngineCacheHit","value":"false"},{"key":"sonar.projectBaseDir","value":"/mnt"}]}
[INFO]  ScannerEngine: Starting SonarScanner Engine...
[INFO]  ScannerEngine: Java 17.0.11 Eclipse Adoptium (64-bit)
[DEBUG] ScannerEngine: JVM max available memory: 1 GB
[DEBUG] ScannerEngine: Sonar User Home: /mnt/.sonar
[DEBUG] ScannerEngine: Initialize DefaultScannerWsClient
[DEBUG] ScannerEngine: Loaded [420] system trusted certificates
[INFO]  ScannerEngine: Load global settings
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/settings/values.protobuf
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/settings/values.protobuf (1211ms, unknown-length body)
[INFO]  ScannerEngine: Load global settings (done) | time=1257ms
[INFO]  ScannerEngine: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
[DEBUG] ScannerEngine: Initialize DownloadPluginsScannerWsClient
[DEBUG] ScannerEngine: Loaded [420] system trusted certificates
[DEBUG] ScannerEngine: Create : /mnt/.sonar/_tmp
[DEBUG] ScannerEngine: User cache: /mnt/.sonar/cache
[INFO]  ScannerEngine: Loading required plugins
[INFO]  ScannerEngine: Load plugins index
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/plugins/installed
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/plugins/installed (220ms, unknown-length body)
[INFO]  ScannerEngine: Load plugins index (done) | time=232ms
[INFO]  ScannerEngine: Load/download plugins
[DEBUG] ScannerEngine: Download plugin 'iac' to '/mnt/.sonar/_tmp/fileCache11902000237238080699.tmp'
[DEBUG] ScannerEngine: --> GET https://scanner.sonarcloud.io/plugins/iac/versions/6f35ca3e99af24c55523de09f755b1b6.jar
[DEBUG] ScannerEngine: <-- 200 https://scanner.sonarcloud.io/plugins/iac/versions/6f35ca3e99af24c55523de09f755b1b6.jar (59ms, 17593907-byte body)
[DEBUG] ScannerEngine: Download plugin 'jacoco' to '/mnt/.sonar/_tmp/fileCache7859858975237582713.tmp'
[DEBUG] ScannerEngine: --> GET https://scanner.sonarcloud.io/plugins/jacoco/versions/04bba36a445c3713a632aa358be2f99c.jar
[DEBUG] ScannerEngine: <-- 200 https://scanner.sonarcloud.io/plugins/jacoco/versions/04bba36a445c3713a632aa358be2f99c.jar (7ms, 23258-byte body)
[DEBUG] ScannerEngine: Download plugin 'license' to '/mnt/.sonar/_tmp/fileCache1449181252321114422.tmp'
[DEBUG] ScannerEngine: --> GET https://scanner.sonarcloud.io/plugins/license/versions/8982b629135d417e8f43cf9fca61e3e2.jar
[DEBUG] ScannerEngine: <-- 200 https://scanner.sonarcloud.io/plugins/license/versions/8982b629135d417e8f43cf9fca61e3e2.jar (8ms, 17403-byte body)
[DEBUG] ScannerEngine: Download plugin 'text' to '/mnt/.sonar/_tmp/fileCache1121690164667620120.tmp'
[DEBUG] ScannerEngine: --> GET https://scanner.sonarcloud.io/plugins/text/versions/11a9b9e5d76fe507aaf1738f48e0b383.jar
[DEBUG] ScannerEngine: <-- 200 https://scanner.sonarcloud.io/plugins/text/versions/11a9b9e5d76fe507aaf1738f48e0b383.jar (6ms, 7022155-byte body)
[DEBUG] ScannerEngine: Download plugin 'xml' to '/mnt/.sonar/_tmp/fileCache4306492203557554531.tmp'
[DEBUG] ScannerEngine: --> GET https://scanner.sonarcloud.io/plugins/xml/versions/dc7530956473c81946456a4a3587ff22.jar
[DEBUG] ScannerEngine: <-- 200 https://scanner.sonarcloud.io/plugins/xml/versions/dc7530956473c81946456a4a3587ff22.jar (9ms, 2507592-byte body)
[INFO]  ScannerEngine: Load/download plugins (done) | time=3726ms
[DEBUG] ScannerEngine: Plugins not loaded because they are optional: [abap, sonarapex, csharp, cpp, cobol, dbd, dbdjavafrontend, dbdpythonfrontend, flex, go, web, jcl, javasymbolicexecution, java, javascript, kotlin, php, pli, plsql, python, rpg, ruby, sonarscala, swift, tsql, vbnet, vb, security, securitycsharpfrontend, securityjsfrontend, securityjavafrontend, securityphpfrontend, securitypythonfrontend, dart]
[DEBUG] ScannerEngine: Plugins loaded:
[DEBUG] ScannerEngine:   * JaCoCo 1.3.0.1538 (jacoco)
[DEBUG] ScannerEngine:   * License for SonarLint 8.0.0.56641 (license)
[DEBUG] ScannerEngine:   * IaC Code Quality and Security 1.34.0.12019 (iac)
[DEBUG] ScannerEngine:   * Text Code Quality and Security 2.15.0.3845 (text)
[DEBUG] ScannerEngine:   * XML Code Quality and Security 2.10.0.4108 (xml)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/server/version
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/server/version (309ms, 11-byte body)
[DEBUG] ScannerEngine: Updated analysis started with a difference of -828 milliseconds
[DEBUG] ScannerEngine: Started at Mon Sep 16 18:07:26 UTC 2024
[DEBUG] ScannerEngine: register org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$277/0x00007f5b842c2f10@2cfbeac4 with shutdown hook
[DEBUG] ScannerEngine: Could not detect any CI vendor
[INFO]  ScannerEngine: Load project settings for component key: 'fabric2_lib-error'
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/settings/values.protobuf?component=fabric2_lib-error
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/settings/values.protobuf?component=fabric2_lib-error (366ms, unknown-length body)
[INFO]  ScannerEngine: Load project settings for component key: 'fabric2_lib-error' (done) | time=369ms
[INFO]  ScannerEngine: Process project properties
[DEBUG] ScannerEngine: Process project properties (done) | time=13ms
[INFO]  ScannerEngine: Project key: fabric2_lib-error
[INFO]  ScannerEngine: Base dir: /mnt
[INFO]  ScannerEngine: Working dir: /mnt/.sonar
[DEBUG] ScannerEngine: Project global encoding: US-ASCII, default locale: en_US
[DEBUG] ScannerEngine: Creating module hierarchy
[DEBUG] ScannerEngine:   Init module 'lib-error'
[DEBUG] ScannerEngine:     Base dir: /mnt
[DEBUG] ScannerEngine:     Working dir: /mnt/.sonar
[DEBUG] ScannerEngine:     Module global encoding: US-ASCII, default locale: en_US
[INFO]  ScannerEngine: Load project branches
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/project_branches/list?project=fabric2_lib-error
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/project_branches/list?project=fabric2_lib-error (276ms, unknown-length body)
[INFO]  ScannerEngine: Load project branches (done) | time=285ms
[INFO]  ScannerEngine: Check ALM binding of project 'fabric2_lib-error'
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/alm_integration/is_project_bound?project=fabric2_lib-error
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/alm_integration/is_project_bound?project=fabric2_lib-error (299ms, unknown-length body)
[INFO]  ScannerEngine: Detected project binding: BOUND
[INFO]  ScannerEngine: Check ALM binding of project 'fabric2_lib-error' (done) | time=306ms
[INFO]  ScannerEngine: Load project pull requests
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/project_pull_requests/list?project=fabric2_lib-error
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/project_pull_requests/list?project=fabric2_lib-error (275ms, unknown-length body)
[INFO]  ScannerEngine: Load project pull requests (done) | time=295ms
[INFO]  ScannerEngine: Load branch configuration
[INFO]  ScannerEngine: Load branch configuration (done) | time=9ms
[INFO]  ScannerEngine: Load quality profiles
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/qualityprofiles/search.protobuf?projectKey=fabric2_lib-error&organization=fabric-gitlab
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/qualityprofiles/search.protobuf?projectKey=fabric2_lib-error&organization=fabric-gitlab (488ms, 5087-byte body)
[INFO]  ScannerEngine: Load quality profiles (done) | time=524ms
[INFO]  ScannerEngine: Load active rules
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYI5iBv5YiWOCbm_Y8Td&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYI5iBv5YiWOCbm_Y8Td&ps=500&p=1 (235ms, 5846-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRd&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRd&ps=500&p=1 (277ms, 7236-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRp&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRp&ps=500&p=1 (302ms, 8119-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRb&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRb&ps=500&p=1 (242ms, 11-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRj&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRj&ps=500&p=1 (354ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRk&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRk&ps=500&p=1 (259ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRa&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRa&ps=500&p=1 (239ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYXoQrEd9Ao2yLWbMS-6&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYXoQrEd9Ao2yLWbMS-6&ps=500&p=1 (293ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRc&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRc&ps=500&p=1 (239ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AZHgMmHbZ_un-6v82_ht&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AZHgMmHbZ_un-6v82_ht&ps=500&p=1 (319ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AZFU5xVY4M0h26274zfL&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AZFU5xVY4M0h26274zfL&ps=500&p=1 (220ms, 2798-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRu&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRu&ps=500&p=1 (281ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRu&ps=500&p=2
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRu&ps=500&p=2 (296ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRg&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRg&ps=500&p=1 (258ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRZ&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRZ&ps=500&p=1 (345ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRX&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRX&ps=500&p=1 (297ms, 6000-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRR&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRR&ps=500&p=1 (246ms, 11-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AZFvm8RrcUjvLIw7hzEx&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AZFvm8RrcUjvLIw7hzEx&ps=500&p=1 (346ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX6LfYcZEtnFPnYRcTiz&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX6LfYcZEtnFPnYRcTiz&ps=500&p=1 (302ms, 288-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRx&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRx&ps=500&p=1 (242ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXriBDI7r7WCwZj2ar8_&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXriBDI7r7WCwZj2ar8_&ps=500&p=1 (226ms, 7589-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRi&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRi&ps=500&p=1 (312ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXriBx66r7WCwZj2bHp4&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXriBx66r7WCwZj2bHp4&ps=500&p=1 (221ms, 11-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRs&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRs&ps=500&p=1 (278ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRt&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRt&ps=500&p=1 (243ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRq&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRq&ps=500&p=1 (260ms, 6405-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRn&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRn&ps=500&p=1 (244ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRT&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRT&ps=500&p=1 (380ms, 7367-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRy&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRy&ps=500&p=1 (221ms, 4412-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRh&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRh&ps=500&p=1 (231ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRS&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRS&ps=500&p=1 (254ms, 6266-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYXoTKkk9Ao2yLWbNHvN&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYXoTKkk9Ao2yLWbNHvN&ps=500&p=1 (230ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRl&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRl&ps=500&p=1 (305ms, 8036-byte body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRf&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRf&ps=500&p=1 (373ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRW&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRW&ps=500&p=1 (230ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRr&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRr&ps=500&p=1 (249ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXriCm9Yr7WCwZj2bjWw&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXriCm9Yr7WCwZj2bjWw&ps=500&p=1 (236ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYk_-kmiEjuu3U2UB-CK&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYk_-kmiEjuu3U2UB-CK&ps=500&p=1 (341ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRm&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRm&ps=500&p=1 (224ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRw&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRw&ps=500&p=1 (280ms, unknown-length body)
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRv&ps=500&p=1
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXqmVjP8XLVVAP10quRv&ps=500&p=1 (259ms, unknown-length body)
[INFO]  ScannerEngine: Load active rules (done) | time=12370ms
[DEBUG] ScannerEngine: --> GET https://sonarcloud.io/api/languages/list
[DEBUG] ScannerEngine: <-- 200 https://sonarcloud.io/api/languages/list (354ms, unknown-length body)
[INFO]  ScannerEngine: Organization key: fabric-gitlab
[DEBUG] ScannerEngine: Declared patterns of language Kubernetes were converted to sonar.lang.patterns.kubernetes : 
[DEBUG] ScannerEngine: Declared patterns of language CSS were converted to sonar.lang.patterns.css : **/*.css,**/*.less,**/*.scss,**/*.sass
[DEBUG] ScannerEngine: Declared patterns of language Scala were converted to sonar.lang.patterns.scala : **/*.scala
[DEBUG] ScannerEngine: Declared patterns of language JSP were converted to sonar.lang.patterns.jsp : **/*.jsp,**/*.jspf,**/*.jspx
[DEBUG] ScannerEngine: Declared patterns of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.cjs,**/*.mjs,**/*.vue
[DEBUG] ScannerEngine: Declared patterns of language Python were converted to sonar.lang.patterns.py : **/*.py
[DEBUG] ScannerEngine: Declared patterns of language Apex were converted to sonar.lang.patterns.apex : **/*.cls,**/*.trigger
[DEBUG] ScannerEngine: Declared patterns of language Docker were converted to sonar.lang.patterns.docker : **/Dockerfile,**/*.dockerfile
[DEBUG] ScannerEngine: Declared patterns of language PL/SQL were converted to sonar.lang.patterns.plsql : **/*.sql,**/*.tab,**/*.pkb
[DEBUG] ScannerEngine: Declared patterns of language Dart were converted to sonar.lang.patterns.dart : **/*.dart
[DEBUG] ScannerEngine: Declared patterns of language JCL were converted to sonar.lang.patterns.jcl : **/*.jcl
[DEBUG] ScannerEngine: Declared patterns of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
[DEBUG] ScannerEngine: Declared patterns of language HTML were converted to sonar.lang.patterns.web : **/*.html,**/*.xhtml,**/*.cshtml,**/*.vbhtml,**/*.aspx,**/*.ascx,**/*.rhtml,**/*.erb,**/*.shtm,**/*.shtml,**/*.cmp,**/*.twig
[DEBUG] ScannerEngine: Declared patterns of language Flex were converted to sonar.lang.patterns.flex : **/*.as
[DEBUG] ScannerEngine: Declared patterns of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl,**/*.config
[DEBUG] ScannerEngine: Declared patterns of language JSON were converted to sonar.lang.patterns.json : **/*.json
[DEBUG] ScannerEngine: Declared patterns of language IPython Notebooks were converted to sonar.lang.patterns.ipynb : **/*.ipynb
[DEBUG] ScannerEngine: Declared patterns of language Text were converted to sonar.lang.patterns.text : 
[DEBUG] ScannerEngine: Declared patterns of language VB.NET were converted to sonar.lang.patterns.vbnet : **/*.vb
[DEBUG] ScannerEngine: Declared patterns of language CloudFormation were converted to sonar.lang.patterns.cloudformation : 
[DEBUG] ScannerEngine: Declared patterns of language Swift were converted to sonar.lang.patterns.swift : **/*.swift
[DEBUG] ScannerEngine: Declared patterns of language YAML were converted to sonar.lang.patterns.yaml : **/*.yaml,**/*.yml
[DEBUG] ScannerEngine: Declared patterns of language C++ were converted to sonar.lang.patterns.cpp : **/*.cc,**/*.cpp,**/*.cxx,**/*.c++,**/*.hh,**/*.hpp,**/*.hxx,**/*.h++,**/*.ipp,**/*.ixx,**/*.mxx,**/*.cppm,**/*.ccm,**/*.cxxm,**/*.c++m
[DEBUG] ScannerEngine: Declared patterns of language C were converted to sonar.lang.patterns.c : **/*.c,**/*.h
[DEBUG] ScannerEngine: Declared patterns of language Go were converted to sonar.lang.patterns.go : **/*.go
[DEBUG] ScannerEngine: Declared patterns of language Kotlin were converted to sonar.lang.patterns.kotlin : **/*.kt,**/*.kts
[DEBUG] ScannerEngine: Declared patterns of language RPG were converted to sonar.lang.patterns.rpg : **/*.rpg,**/*.rpgle,**/*.sqlrpgle,**/*.rpg,**/*.rpgle,**/*.sqlrpgle
[DEBUG] ScannerEngine: Declared patterns of language PL/I were converted to sonar.lang.patterns.pli : **/*.pli
[DEBUG] ScannerEngine: Declared patterns of language T-SQL were converted to sonar.lang.patterns.tsql : **/*.tsql
[DEBUG] ScannerEngine: Declared patterns of language Vb were converted to sonar.lang.patterns.vb : **/*.bas,**/*.frm,**/*.ctl
[DEBUG] ScannerEngine: Declared patterns of language Secrets were converted to sonar.lang.patterns.secrets : 
[DEBUG] ScannerEngine: Declared patterns of language Ruby were converted to sonar.lang.patterns.ruby : **/*.rb
[DEBUG] ScannerEngine: Declared patterns of language C# were converted to sonar.lang.patterns.cs : **/*.cs,**/*.razor
[DEBUG] ScannerEngine: Declared patterns of language COBOL were converted to sonar.lang.patterns.cobol : 
[DEBUG] ScannerEngine: Declared patterns of language PHP were converted to sonar.lang.patterns.php : **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
[DEBUG] ScannerEngine: Declared patterns of language Terraform were converted to sonar.lang.patterns.terraform : **/*.tf
[DEBUG] ScannerEngine: Declared patterns of language AzureResourceManager were converted to sonar.lang.patterns.azureresourcemanager : **/*.bicep
[DEBUG] ScannerEngine: Declared patterns of language ABAP were converted to sonar.lang.patterns.abap : **/*.abap,**/*.ab4,**/*.flow,**/*.asprog
[DEBUG] ScannerEngine: Declared patterns of language Objective-C were converted to sonar.lang.patterns.objc : **/*.m
[DEBUG] ScannerEngine: Declared patterns of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx,**/*.cts,**/*.mts
[INFO]  ScannerEngine: Preprocessing files...
[DEBUG] ScannerEngine: loading config FileBasedConfig[/root/.config/jgit/config]
[DEBUG] ScannerEngine: readpipe [/usr/bin/git, --version],/usr/bin
[WARN]  ScannerEngine: Cannot run program "/usr/bin/git" (in directory "/usr/bin"): error=2, No such file or directory
[DEBUG] ScannerEngine: loading config FileBasedConfig[/root/.config/git/config]
[DEBUG] ScannerEngine: loading config UserConfigFile[/root/.gitconfig]
[DEBUG] ScannerEngine: 13 non excluded files in this Git repository
[INFO]  ScannerEngine: 
[INFO]  ScannerEngine: 2 languages detected in 7 preprocessed files
[INFO]  ScannerEngine: 5231 files ignored because of inclusion/exclusion patterns
[INFO]  ScannerEngine: 0 files ignored because of scm ignore settings
[DEBUG] ScannerEngine: Could not detect the node.js version.
[INFO]  ScannerEngine: Loading plugins for detected languages
[DEBUG] ScannerEngine: Detected languages: [js, json]
[INFO]  ScannerEngine: Load/download plugins
[INFO]  ScannerEngine: Load/download plugins (done) | time=1ms
[ERROR] ScannerEngine: Error during SonarScanner Engine execution
java.lang.IllegalStateException: Fail to create temp file in /mnt/.sonar/_tmp
	at org.sonar.scanner.bootstrap.PluginFiles.newTempFile(PluginFiles.java:126)
	at org.sonar.scanner.bootstrap.PluginFiles.downloadUnpackedPlugin(PluginFiles.java:70)
	at org.sonar.scanner.bootstrap.PluginFiles.get(PluginFiles.java:66)
	at org.sonar.scanner.bootstrap.ScannerPluginInstaller.loadPlugins(ScannerPluginInstaller.java:122)
	at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installPlugins(ScannerPluginInstaller.java:100)
	at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installPluginsForLanguages(ScannerPluginInstaller.java:80)
	at org.sonar.scanner.bootstrap.ScannerPluginRepository.installPluginsForLanguages(ScannerPluginRepository.java:87)
	at org.sonar.scanner.scan.ProjectScanContainer.installPluginsForLanguages(ProjectScanContainer.java:72)
	at org.sonar.scanner.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:66)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:121)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:416)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:135)
	at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:52)
	at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:38)
Caused by: java.nio.file.NoSuchFileException: /mnt/.sonar/_tmp/fileCache17948361009284799080.tmp
	at java.base/sun.nio.fs.UnixException.translateToIOException(Unknown Source)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(Unknown Source)
	at java.base/java.nio.file.Files.newByteChannel(Unknown Source)
	at java.base/java.nio.file.Files.createFile(Unknown Source)
	at java.base/java.nio.file.TempFileHelper.create(Unknown Source)
	at java.base/java.nio.file.TempFileHelper.createTempFile(Unknown Source)
	at java.base/java.nio.file.Files.createTempFile(Unknown Source)
	at org.sonar.scanner.bootstrap.PluginFiles.newTempFile(PluginFiles.java:124)
	... 19 common frames omitted
[DEBUG] ScannerEngine: Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$277/0x00007f5b842c2f10@2cfbeac4 during JVM shutdown
[ERROR] Bootstrapper: An error occurred: Error: Scanner engine failed with code 1

I donā€™t have line numbers on this, but you can see the interesting pieces:

[DEBUG] ScannerEngine: Create : /mnt/.sonar/_tmp
...
java.lang.IllegalStateException: Fail to create temp file in /mnt/.sonar/_tmp

This is because somewhere along the way that _tmp directory has been removed. After the run I can see:

# ls -latr .sonar
total 0
-rw-r--r-- 1 root root    0 Sep 13 06:26 .sonar_lock
drwxrwxrwx 1 root root 4096 Sep 16 18:07 ..
drwxr-xr-x 1 root root 4096 Sep 16 18:07 scanner-report
drwxr-xr-x 1 root root 4096 Sep 16 18:07 .

Hereā€™s analysis.log from that scanner-report directory if that helps:

# cat analysis.log
SonarCloud plugins:
  - JaCoCo 1.3.0.1538 (jacoco)
  - License for SonarLint 8.0.0.56641 (license)
  - IaC Code Quality and Security 1.34.0.12019 (iac)
  - Text Code Quality and Security 2.15.0.3845 (text)
  - XML Code Quality and Security 2.10.0.4108 (xml)
Project server settings:
  - sonar.abap.file.suffixes=.abap,.ab4,.flow,.asprog
  - sonar.apex.file.suffixes=.cls,.trigger
  - sonar.autoscan.enabled=false
  - sonar.azureresourcemanager.file.suffixes=.bicep
  - sonar.c.file.suffixes=.c,.h
  - sonar.cpp.file.suffixes=.cc,.cpp,.cxx,.c++,.hh,.hpp,.hxx,.h++,.ipp,.ixx,.mxx,.cppm,.ccm,.cxxm,.c++m
  - sonar.cs.file.suffixes=.cs,.razor
  - sonar.css.file.suffixes=.css,.less,.scss,.sass
  - sonar.dart.file.suffixes=.dart
  - sonar.docker.file.patterns=Dockerfile,*.dockerfile
  - sonar.flex.file.suffixes=as
  - sonar.go.file.suffixes=.go
  - sonar.html.file.suffixes=.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,.cmp,.twig
  - sonar.ipynb.file.suffixes=ipynb
  - sonar.java.file.suffixes=.java,.jav
  - sonar.java.jvmframeworkconfig.file.patterns=**/src/main/resources/**/application*.properties,**/src/main/resources/**/application*.yaml,**/src/main/resources/**/application*.yml
  - sonar.javascript.file.suffixes=.js,.jsx,.cjs,.mjs,.vue
  - sonar.jcl.file.suffixes=.jcl
  - sonar.json.file.suffixes=.json
  - sonar.jsp.file.suffixes=.jsp,.jspf,.jspx
  - sonar.kotlin.file.suffixes=.kt,.kts
  - sonar.objc.file.suffixes=.m
  - sonar.php.file.suffixes=php,php3,php4,php5,phtml,inc
  - sonar.pli.file.suffixes=.pli
  - sonar.plsql.file.suffixes=sql,tab,pkb
  - sonar.python.file.suffixes=py
  - sonar.rpg.file.suffixes=.rpg,.rpgle,.sqlrpgle,.RPG,.RPGLE,.SQLRPGLE
  - sonar.ruby.file.suffixes=.rb
  - sonar.scala.file.suffixes=.scala
  - sonar.swift.file.suffixes=.swift
  - sonar.terraform.file.suffixes=.tf
  - sonar.tsql.file.suffixes=.tsql
  - sonar.typescript.file.suffixes=.ts,.tsx,.cts,.mts
  - sonar.vb.file.suffixes=.bas,.frm,.ctl
  - sonar.vbnet.file.suffixes=.vb
  - sonar.xml.file.suffixes=.xml,.xsd,.xsl,.config
  - sonar.yaml.file.suffixes=.yaml,.yml
Project scanner properties:
  - sonar.exclusions=node_modules/**,bower_components/**,jspm_packages/**,typings/**,lib-cov/**
  - sonar.host.url=https://sonarcloud.io
  - sonar.javascript.lcov.reportPaths=.cicd/tests/lcov.info
  - sonar.links.homepage=https://gitlab.com/fabric2/libs/lib-error
  - sonar.links.scm=git+ssh://git@gitlab.com:fabric2/libs/lib-error.git
  - sonar.organization=fabric-gitlab
  - sonar.projectBaseDir=/mnt
  - sonar.projectKey=fabric2_lib-error
  - sonar.projectName=lib-error
  - sonar.projectVersion=3.0.0
  - sonar.qualitygate.wait=true
  - sonar.scanner.apiBaseUrl=https://api.sonarcloud.io
  - sonar.scanner.app=ScannerNpm
  - sonar.scanner.appVersion=4.2.2
  - sonar.scanner.arch=x64
  - sonar.scanner.bootstrapStartTime=1726510031125
  - sonar.scanner.internal.isSonarCloud=true
  - sonar.scanner.os=linux
  - sonar.scanner.wasEngineCacheHit=false
  - sonar.scanner.wasJreCacheHit=miss
  - sonar.sources=.
  - sonar.test.inclusions=**/*.test.js
  - sonar.testExecutionReportPaths=.cicd/tests/results-sonar.xml
  - sonar.tests=.
  - sonar.token=******
  - sonar.userHome=/mnt/.sonar
  - sonar.verbose=true

Hi,

Could we have the .gitlab-ci.yml too, please? (Sorry I didnā€™t ask earlier.)

 
Thx,
Ann

You can, but this reproduction doesnā€™t involve GitLab at all: I tried to remove that from the equation to simplify the investigation. Instead, I just navigate to the project locally, launch a docker container that mounts it locally, and run the analysis from there.

Hereā€™s .gitlab-ci.yml:

include:
  - component: gitlab.com/fabric2/cicd/components/nodejs/full-pipeline@0.1

The component brings in several jobs, the one of interest would be:

publish-analysis:
  image:
    name: registry.gitlab.com/fabric2/cicd/components/nodejs/sonarqube-scanner@sha256:99827235756f91dd74884108b089c0de0f1035b57e7b2a953ba06ab8f7db2983
    entrypoint: [""]
  variables:
    # https://community.sonarsource.com/t/-/125018
    # Sonar bug prevents overiding SONAR_USER_HOME
    SONAR_USER_HOME: ~
  # As Sonar cache is written locally to the container owing to the above
  # bug, it cannot be cached.
  cache: ~

This overrides the job Iā€™ve defined for the generic (non-NPM) case:

publish-analysis:
  stage: test
  needs:
    - $[[ inputs.needs ]]
  image:
    name: sonarsource/sonar-scanner-cli:latest
    entrypoint: ['']
  variables:
    SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"
    GIT_DEPTH: "0"
  cache:
    key: "${CI_JOB_NAME}"
    paths:
      - .sonar/cache
    when: always
  script:
    - |
      [ "${CI_MERGE_REQUEST_TARGET_BRANCH_PROTECTED}" != 'true' \
      -a "${CI_COMMIT_REF_PROTECTED}" != 'true' ] ||
        sonar-scanner -Dsonar.qualitygate.wait=true

Note that it undoes the custom SONAR_USER_HOME, which is my current workaround for this issue.

Hi,

I asked for that because Iā€™m trying to understand whatā€™s in use. You said everything was fine until you switched to the NPM scanner, but the scanner command you gave above was sonar-scanner. Whatā€™s the through-line here? Does it boil down to Docker? To NPM? Toā€¦ something else?

 
Thx,
Ann

Gotcha. Yep, if you look at the two jobs above you can see the base job uses the default CLI scanner from sonarsource/sonar-scanner-cli:latest. When I started experimenting with the NPM scanner, I replaced it with our own container, which is built thus:

# syntax = docker/dockerfile:1
FROM node:20-slim

ARG SONARQUBE_SCANNER_VERSION=4

RUN apt-get update && apt-get install -y \
    git \
    && rm -rf /var/lib/apt/lists/* \
    && npm i -g sonarqube-scanner@^${SONARQUBE_SCANNER_VERSION}

The command name (sonar-scanner) is the same for both the CLI image and the globally-installed NPM package, so the guts of the CI/CD job donā€™t need to change, just the base image.

I was then able to reproduce the problem locally by running these same steps in a Docker image with the root of the repository mounted.

Hi,

Thanks for the clarification. Iā€™m going to flag this for the team.

 
Ann

Hey Ann!

Just thought Iā€™d check in and see if you had any insight from the team yet (or a rough time frame for when to bug you again). Given the background you were able to give on the utility (or otherwise) of client-side caching Iā€™m good with our current workaround (not overriding the custom home directory), but would like to know if a cleaner solution will be available soon.

Cheers,

Jack.

Hi Jack,

Sorry, but I donā€™t have anything for you. Hopefully theyā€™ll be along soon.

 
Ann

Hey @JackWhelpton,

I was able to reproduce your issue with the docker example you provided. In your case, the userHome and projectBaseDir (the current directory when running the scan) are conflicting. The userHome needs to be outside of the directory used for the project to avoid conflicts with cache cleanup.

Let me know if this resolves the issue for you :pray:

Thanks Lucas, good to know Iā€™m not going crazy!

Unfortunately moving the cache outside the project directory makes it worthless for CI/CD pipelines, as GitLabā€™s caching between pipelines will only work for files inside that directory:

Both artifacts and caches define their paths relative to the project directory, and canā€™t link to files outside it.

Setting USER_HOME within the project directory is the recommended configuration in the Sonar docs:

Indeed youā€™re right! With a little more investigation I found that the NPM scanner is not specifically setting the working directory (as is done by other scanners, including the CLI), and because of this
the UserHome directory is colliding with it, causing the issue you see.

What you can do for now to resolve this issue is to explicitly set the working directory
(e.g. sonar.working.directory=.sonarwork )
and this will fix the issue without needing to diverge from the projectDir.

I have created a ticket to address this within the NPM scanner to address the issue in the long run
https://sonarsource.atlassian.net/browse/SCANNPM-49

1 Like

still have some issue about npm cli tools,if i set sonar.working.directory via cmd arguments,itā€™s seems still not work

variables:
  SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"  # Defines the location of the analysis task cache
  GIT_DEPTH: "0"  # Tells git to fetch all the branches of the project, required by the analysis task
  SONAR_PROJECT_KEY: "some key"  # The key of the project as defined in SonarQube

stages:
  - build

sonar-lint:
  stage: build
  tags:
    - node
  script: 
    - sonar-scanner \
      -Dsonar.projectKey="${SONAR_PROJECT_KEY}" \
      -Dsonar.qualitygate.wait="true" \
      -Dsonar.working.directory=".sonarwork" \
      -Dsonar.host.url="${SONAR_HOST_URL}" \
      -Dsonar.login="${SONAR_LOGIN}"  # Make sure to set this in GitLab CI/CD variables
  allow_failure: true

if i use this yaml file,and gitlab runner already installed scanner,itā€™s seems not work

java.lang.IllegalStateException: Fail to create temp file in /home/gitlab-runner/builds/58R4tYub/0/somepath/.sonar/_tmp

if create sonar-project.properties file and move them in then works fine

sonar.projectKey=some sonar key
sonar.qualitygate.wait=true
# https://community.sonarsource.com/t/sonar-scanner-npm-fails-writing-temporary-files-when-sonar-user-home-is-set/125018/19
sonar.working.directory=.sonarwork

then gitlab runner file like

variables:
  SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"  # Defines the location of the analysis task cache
  GIT_DEPTH: "0"  # Tells git to fetch all the branches of the project, required by the analysis task
  SONAR_PROJECT_KEY: "some key"  # The key of the project as defined in SonarQube

stages:
  - build

sonar-lint:
  stage: build
  tags:
    - node
  script: 
    - sonar-scanner \
      -Dsonar.host.url="${SONAR_HOST_URL}" \
      -Dsonar.login="${SONAR_LOGIN}"  # Make sure to set this in GitLab CI/CD variables
  allow_failure: true

We made some changes to default to .sonarwork as the working directory

could you try again without explicitly overriding it?

Iā€™m glad to hear you were able to unblock yourself using the sonar-project.properties and removing the properties from the script command

1 Like