Another "Fail to create temp file in .../.sonar/_tmp"

  • SonarQube Server (Developer)
  • pysonar: 1.1.0.2035
  • how is SonarQube deployed: Helm
  • what are you trying to achieve: scan

Additional:

  • Using in GitLab CI/CD
  • refactored our Python GitLab CI/CD component and upgraded from pysonar-scanner 0.1.0.340

As you can see in the log we can create the directory path .sonar/_tmp

but pysonar (actually, SonarScanner) can’t create the temp file.

$ id
uid=1000710000(1000710000) gid=0(root) groups=0(root),1000710000
$ mkdir -p .sonar/_tmp
$ pwd
/builds/sysdev/devops/pipeline-tools/container-file-creator
$ ls -la
total 24
drwxrwsrwx. 9 1000710000 1000710000 4096 Aug  7 13:26 .
drwxrwsrwx. 4 1000710000 1000710000   70 Aug  7 13:25 ..
drwxrwsrwx. 6 1000710000 1000710000  113 Aug  7 13:25 .git
-rw-rw-rw-. 1 1000710000 1000710000  212 Aug  7 13:25 .gitlab-ci.yml
drwxr-sr-x. 3 1000710000 1000710000   18 Aug  7 13:26 .sonar
-rw-rw-rw-. 1 1000710000 1000710000  335 Aug  7 13:25 README.md
drwxr-xr-x. 2 1000710000 1000710000   64 Aug  7 13:25 build
drwxrwsrwx. 3 1000710000 1000710000   20 Aug  7 13:26 cloned_repos
drwxrwsrwx. 2 1000710000 1000710000   84 Aug  7 13:25 containerbuild
-rw-rw-rw-. 1 1000710000 1000710000 1682 Aug  7 13:25 pyproject.toml
-rw-rw-rw-. 1 1000710000 1000710000  179 Aug  7 13:25 renovate.json5
-rw-r--r--. 1 1000710000 1000710000   96 Aug  7 13:24 sonar-project.properties
drwxrwsrwx. 3 1000710000 1000710000   36 Aug  7 13:25 src
drwxrwsrwx. 4 1000710000 1000710000   35 Aug  7 13:25 tests
$ pysonar --sonar-qualitygate-wait --sonar-sources src --sonar-tests tests --sonar-python-xunit-report-path build/junit.xml --sonar-python-coverage-report-paths build/coverage.xml --sonar-python-flake8-report-paths build/flake8.report
INFO: Starting the analysis...
INFO: Starting SonarScanner Engine...
INFO: Java 17.0.13 Eclipse Adoptium (64-bit)
INFO: Load global settings
INFO: Load global settings (done) | time=502ms
INFO: Server id: 671E7C50-AXuyyDQiased6qMiZ54M
INFO: Loading required plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=45ms
INFO: Load/download plugins
INFO: Load/download plugins (done) | time=2085ms
INFO: Loaded core extensions: developer-scanner
INFO: Process project properties
INFO: Process project properties (done) | time=12ms
INFO: Project key: sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4
INFO: Base dir: /builds/sysdev/devops/pipeline-tools/container-file-creator
INFO: Working dir: /builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar
INFO: Load project settings for component key: 'sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4'
INFO: Load project settings for component key: 'sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4' (done) | time=36ms
INFO: Load project branches
INFO: Load project branches (done) | time=39ms
INFO: Load branch configuration
INFO: Detected branch/PR in 'GitLab'
INFO: Auto-configuring branch 'feature/test_feature/13_allow-us-to-build-for-the-latest-version-of-python'
INFO: Load branch configuration (done) | time=4ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=95ms
INFO: Auto-configuring with CI 'Gitlab CI'
INFO: Load active rules
INFO: Load active rules (done) | time=724ms
INFO: Load analysis cache
INFO: Load analysis cache | time=71ms
INFO: Branch name: feature/test_feature/13_allow-us-to-build-for-the-latest-version-of-python
INFO: Preprocessing files...
WARNING: Cannot run program "/usr/bin/git" (in directory "/usr/bin"): error=2, No such file or directory
INFO: 4 languages detected in 17 preprocessed files
INFO: 0 files ignored because of scm ignore settings
INFO: Loading plugins for detected languages
INFO: Load/download plugins
INFO: Load/download plugins (done) | time=0ms
ERROR: Error during SonarScanner Engine execution
ERROR: java.lang.IllegalStateException: Fail to create temp file in /builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar/_tmp
	at org.sonar.scanner.bootstrap.PluginFiles.newTempFile(PluginFiles.java:163)
	at org.sonar.scanner.bootstrap.PluginFiles.download(PluginFiles.java:97)
	at org.sonar.scanner.bootstrap.PluginFiles.get(PluginFiles.java:89)
	at org.sonar.scanner.bootstrap.ScannerPluginInstaller.loadPlugins(ScannerPluginInstaller.java:123)
	at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installPlugins(ScannerPluginInstaller.java:102)
	at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installPluginsForLanguages(ScannerPluginInstaller.java:83)
	at org.sonar.scanner.bootstrap.ScannerPluginRepository.installPluginsForLanguages(ScannerPluginRepository.java:104)
	at org.sonar.scanner.scan.SpringProjectScanContainer.installPluginsForLanguages(SpringProjectScanContainer.java:90)
	at org.sonar.scanner.scan.SpringProjectScanContainer.doBeforeStart(SpringProjectScanContainer.java:84)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:225)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
	at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:339)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:142)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
	at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:151)
	at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66)
	at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52)
Caused by: java.nio.file.NoSuchFileException: /builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar/_tmp/fileCache6738046257763295766.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:161)
	... 19 common frames omitted

Hi @lfvjimisola,

Thanks for reaching out and reporting this issue.

Unfortunately, I wasn’t able to reproduce the error on my side. As you mentioned correctly, it seems that the sonar-scanner-engine is having problems downloading the plugins.

To help with reproducing this issue, could you run pysonar with --verbose and share the resulting logs.

I also saw that SELinux is activated for the .sonar folder. Would it be possible that the SELinux configuration prevents the scanner from creating the temp file? Or more generally, are there some strange permissions configured in the environment.

Last but not least, which version of SonarQube Server are you running?

Best,
Sebastian Zumbrunn

Here is the pysonar –verbose output (removed two debug statements that contained properties for security reason).

DEBUG: Starting new HTTPS connection (1): sq.example.com:443
DEBUG: https://sq.example.com:443 "GET /api/v2/analysis/version HTTP/1.1" 200 15
DEBUG: SonarQube url: https://sq.example.com
DEBUG: Starting new HTTPS connection (1): sq.example.com:443
DEBUG: https://sq.example.com:443 "GET /api/v2/analysis/jres?os=linux&arch=x64 HTTP/1.1" 200 None
DEBUG: Starting new HTTPS connection (1): sq.example.com:443
DEBUG: https://sq.example.com:443 "GET /api/v2/analysis/jres/239eae93-1efe-4b56-8446-b431dfcdf828 HTTP/1.1" 200 None
DEBUG: JRE path: /builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar/cache/OpenJDK17U-jre_x64_linux_hotspot_17.0.13_11.tar.gz_unzip/jdk-17.0.13+11-jre/bin/java
DEBUG: Starting new HTTPS connection (1): sq.example.com:443
DEBUG: https://sq.example.com:443 "GET /api/v2/analysis/engine HTTP/1.1" 200 None
DEBUG: No valid cached analysis engine jar was found
DEBUG: Starting new HTTPS connection (1): sq.example.com:443
DEBUG: https://sq.example.com:443 "GET /api/v2/analysis/engine HTTP/1.1" 200 None
INFO: Starting the analysis...
DEBUG: Command: ['/builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar/cache/OpenJDK17U-jre_x64_linux_hotspot_17.0.13_11.tar.gz_unzip/jdk-17.0.13+11-jre/bin/java', '-jar', '/builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar/cache/scanner-developer-2025.4.2.112048-all.jar']
INFO: Starting SonarScanner Engine...
INFO: Java 17.0.13 Eclipse Adoptium (64-bit)
DEBUG: JVM max available memory: 7 GB
DEBUG: Developer 2025.4.2.112048
DEBUG: Sonar User Home: /builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar
DEBUG: Loading OS trusted SSL certificates...
DEBUG: This operation might be slow or even get stuck. You can skip it by passing the scanner property 'sonar.scanner.skipSystemTruststore=true'
DEBUG: Loaded [438] system trusted certificates
INFO: Load global settings
DEBUG: --> GET https://sq.example.com/api/settings/values.protobuf
DEBUG: <-- 200 https://sq.example.com/api/settings/values.protobuf (194ms, unknown-length body)
INFO: Load global settings (done) | time=232ms
INFO: Server id: 671E7C50-AXuyyDQiased6qMiZ54M
DEBUG: User cache: /builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar/cache
INFO: Loading required plugins
INFO: Load plugins index
DEBUG: --> GET https://sq.example.com/api/plugins/installed
DEBUG: <-- 200 https://sq.example.com/api/plugins/installed (29ms, unknown-length body)
INFO: Load plugins index (done) | time=37ms
INFO: Load/download plugins
DEBUG: Download plugin 'cayc' to '/builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar/_tmp/fileCache7183096519419277298.tmp'
DEBUG: --> GET https://sq.example.com/api/plugins/download?plugin=cayc
DEBUG: <-- 200 https://sq.example.com/api/plugins/download?plugin=cayc (25ms, unknown-length body)
DEBUG: Download plugin 'iac' to '/builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar/_tmp/fileCache13105114144222095906.tmp'
DEBUG: --> GET https://sq.example.com/api/plugins/download?plugin=iac
DEBUG: <-- 200 https://sq.example.com/api/plugins/download?plugin=iac (24ms, unknown-length body)
DEBUG: Download plugin 'iacenterprise' to '/builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar/_tmp/fileCache16001167268813897338.tmp'
DEBUG: --> GET https://sq.example.com/api/plugins/download?plugin=iacenterprise
DEBUG: <-- 200 https://sq.example.com/api/plugins/download?plugin=iacenterprise (32ms, unknown-length body)
DEBUG: Download plugin 'jacoco' to '/builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar/_tmp/fileCache9869055269632114838.tmp'
DEBUG: --> GET https://sq.example.com/api/plugins/download?plugin=jacoco
DEBUG: <-- 200 https://sq.example.com/api/plugins/download?plugin=jacoco (25ms, unknown-length body)
DEBUG: Download plugin 'textdeveloper' to '/builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar/_tmp/fileCache376193520569997894.tmp'
DEBUG: --> GET https://sq.example.com/api/plugins/download?plugin=textdeveloper
DEBUG: <-- 200 https://sq.example.com/api/plugins/download?plugin=textdeveloper (31ms, unknown-length body)
INFO: Load/download plugins (done) | time=1836ms
DEBUG: Plugins not loaded because they are optional: [abap, architecture, architecturejavascriptfrontend, architecturejavafrontend, csharpenterprise, cpp, cfamilydependencies, dart, dbd, dbdjavafrontend, dbdpythonfrontend, flex, go, web, javasymbolicexecution, java, javascript, kotlin, php, plsql, python, ruby, rust, sonarscala, jasmin, swift, tsql, vbnetenterprise, security, securitycsharpfrontend, securitygofrontend, securityjsfrontend, securityjavafrontend, securitykotlinfrontend, securityphpfrontend, securitypythonfrontend, securityvbnetfrontend, xml]
DEBUG: Plugins loaded:
DEBUG:   * JaCoCo 1.3.0.1538 (jacoco)
DEBUG:   * IaC Code Quality and Security 1.48.0.15768 (iacenterprise)
DEBUG:   * IaC Code Quality and Security 1.48.0.15768 (iac)
DEBUG:   * Text Code Quality and Security 2.26.0.7517 (textdeveloper)
DEBUG:   * Clean as You Code 2.4.0.2018 (cayc)
INFO: Loaded core extensions: developer-scanner
DEBUG: Installed core extension: developer-scanner
DEBUG: register org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$391/0x00007fd0e02be318@71870da7 with shutdown hook
INFO: Process project properties
INFO: Process project properties (done) | time=10ms
INFO: Project key: sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4
INFO: Base dir: /builds/sysdev/devops/pipeline-tools/container-file-creator
INFO: Working dir: /builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar
DEBUG: Project global encoding: UTF-8, default locale: en_US
INFO: Load project settings for component key: 'sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4'
DEBUG: --> GET https://sq.example.com/api/settings/values.protobuf?component=sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4
DEBUG: <-- 200 https://sq.example.com/api/settings/values.protobuf?component=sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4 (35ms, unknown-length body)
INFO: Load project settings for component key: 'sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4' (done) | time=37ms
INFO: Load project branches
DEBUG: --> GET https://sq.example.com/api/project_branches/list?project=sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4
DEBUG: <-- 200 https://sq.example.com/api/project_branches/list?project=sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4 (29ms, unknown-length body)
INFO: Load project branches (done) | time=33ms
INFO: Load branch configuration
INFO: Detected branch/PR in 'GitLab'
INFO: Auto-configuring pull request '16'
INFO: Load branch configuration (done) | time=3ms
DEBUG: Creating module hierarchy
DEBUG:   Init module 'container-file-creator'
DEBUG:     Base dir: /builds/sysdev/devops/pipeline-tools/container-file-creator
DEBUG:     Working dir: /builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar
DEBUG:     Module global encoding: UTF-8, default locale: en_US
INFO: Load quality profiles
DEBUG: --> GET https://sq.example.com/api/qualityprofiles/search.protobuf?project=sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4
DEBUG: <-- 200 https://sq.example.com/api/qualityprofiles/search.protobuf?project=sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4 (62ms, 4363-byte body)
INFO: Load quality profiles (done) | time=76ms
INFO: Auto-configuring with CI 'Gitlab CI'
INFO: Load active rules
DEBUG: --> GET https://sq.example.com/api/v2/analysis/active_rules?projectKey=sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4
DEBUG: <-- 200 https://sq.example.com/api/v2/analysis/active_rules?projectKey=sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4 (176ms, unknown-length body)
INFO: Load active rules (done) | time=346ms
INFO: Load analysis cache
DEBUG: --> GET https://sq.example.com/api/analysis_cache/get?project=sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4&branch=main
DEBUG: <-- 200 https://sq.example.com/api/analysis_cache/get?project=sysdev_devops_pipeline-tools_deploy-utils_cfceda2e-82ca-4fcd-98b1-19ac4f45c6b4&branch=main (27ms, unknown-length body)
INFO: Load analysis cache | time=35ms
DEBUG: --> GET https://sq.example.com/api/languages/list
DEBUG: <-- 200 https://sq.example.com/api/languages/list (24ms, unknown-length body)
DEBUG: --> GET https://sq.example.com/api/features/list
DEBUG: <-- 200 https://sq.example.com/api/features/list (111ms, unknown-length body)
INFO: Pull request 16 for merge into main from feature/test_feature/13_allow-us-to-build-for-the-latest-version-of-python
DEBUG: Declared patterns of language Kubernetes were converted to sonar.lang.patterns.kubernetes : 
DEBUG: Declared patterns of language CSS were converted to sonar.lang.patterns.css : **/*.css,**/*.less,**/*.scss,**/*.sass
DEBUG: Declared patterns of language Scala were converted to sonar.lang.patterns.scala : **/*.scala
DEBUG: Declared patterns of language JSP were converted to sonar.lang.patterns.jsp : **/*.jsp,**/*.jspf,**/*.jspx
DEBUG: Declared patterns of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.cjs,**/*.mjs,**/*.vue
DEBUG: Declared patterns of language Python were converted to sonar.lang.patterns.py : **/*.py
DEBUG: Declared patterns of language Ansible were converted to sonar.lang.patterns.ansible : 
DEBUG: Declared patterns of language Docker were converted to sonar.lang.patterns.docker : **/Dockerfile,**/*.dockerfile
DEBUG: Declared patterns of language PL/SQL were converted to sonar.lang.patterns.plsql : **/*.sql,**/*.pks,**/*.pkb
DEBUG: Declared patterns of language Dart were converted to sonar.lang.patterns.dart : **/*.dart
DEBUG: Declared patterns of language Rust were converted to sonar.lang.patterns.rust : **/*.rs
DEBUG: Declared patterns of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
DEBUG: 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: Declared patterns of language Flex were converted to sonar.lang.patterns.flex : **/*.as
DEBUG: Declared patterns of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl,**/*.config
DEBUG: Declared patterns of language JSON were converted to sonar.lang.patterns.json : **/*.json
DEBUG: Declared patterns of language IPython Notebooks were converted to sonar.lang.patterns.ipynb : **/*.ipynb
DEBUG: Declared patterns of language Text were converted to sonar.lang.patterns.text : 
DEBUG: Declared patterns of language VB.NET were converted to sonar.lang.patterns.vbnet : **/*.vb
DEBUG: Declared patterns of language CloudFormation were converted to sonar.lang.patterns.cloudformation : 
DEBUG: Declared patterns of language Swift were converted to sonar.lang.patterns.swift : **/*.swift
DEBUG: Declared patterns of language YAML were converted to sonar.lang.patterns.yaml : **/*.yaml,**/*.yml
DEBUG: 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: Declared patterns of language C were converted to sonar.lang.patterns.c : **/*.c,**/*.h
DEBUG: Declared patterns of language Go were converted to sonar.lang.patterns.go : **/*.go
DEBUG: Declared patterns of language Kotlin were converted to sonar.lang.patterns.kotlin : **/*.kt,**/*.kts
DEBUG: Declared patterns of language T-SQL were converted to sonar.lang.patterns.tsql : **/*.tsql
DEBUG: Declared patterns of language Secrets were converted to sonar.lang.patterns.secrets : 
DEBUG: Declared patterns of language Ruby were converted to sonar.lang.patterns.ruby : **/*.rb
DEBUG: Declared patterns of language C# were converted to sonar.lang.patterns.cs : **/*.cs,**/*.razor
DEBUG: Declared patterns of language PHP were converted to sonar.lang.patterns.php : **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
DEBUG: Declared patterns of language Terraform were converted to sonar.lang.patterns.terraform : **/*.tf
DEBUG: Declared patterns of language AzureResourceManager were converted to sonar.lang.patterns.azureresourcemanager : **/*.bicep
DEBUG: Declared patterns of language ABAP were converted to sonar.lang.patterns.abap : **/*.abap,**/*.ab4,**/*.flow,**/*.asprog
DEBUG: Declared patterns of language Objective-C were converted to sonar.lang.patterns.objc : **/*.m
DEBUG: Declared patterns of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx,**/*.cts,**/*.mts
INFO: Preprocessing files...
DEBUG: loading config FileBasedConfig[/home/sysdev/.config/jgit/config]
DEBUG: readpipe [/usr/bin/git, --version],/usr/bin
WARNING: Cannot run program "/usr/bin/git" (in directory "/usr/bin"): error=2, No such file or directory
DEBUG: loading config FileBasedConfig[/home/sysdev/.config/git/config]
DEBUG: loading config UserConfigFile[/home/sysdev/.gitconfig]
DEBUG: 29 non excluded files in this Git repository
INFO: 4 languages detected in 17 preprocessed files (done) | time=92ms
INFO: 0 files ignored because of scm ignore settings
INFO: Loading plugins for detected languages
DEBUG: Detected languages: [web, py, json, yaml]
INFO: Load/download plugins
INFO: Load/download plugins (done) | time=1ms
ERROR: Error during SonarScanner Engine execution
ERROR: java.lang.IllegalStateException: Fail to create temp file in /builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar/_tmp
	at org.sonar.scanner.bootstrap.PluginFiles.newTempFile(PluginFiles.java:163)
	at org.sonar.scanner.bootstrap.PluginFiles.download(PluginFiles.java:97)
	at org.sonar.scanner.bootstrap.PluginFiles.get(PluginFiles.java:89)
	at org.sonar.scanner.bootstrap.ScannerPluginInstaller.loadPlugins(ScannerPluginInstaller.java:123)
	at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installPlugins(ScannerPluginInstaller.java:102)
	at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installPluginsForLanguages(ScannerPluginInstaller.java:83)
	at org.sonar.scanner.bootstrap.ScannerPluginRepository.installPluginsForLanguages(ScannerPluginRepository.java:104)
	at org.sonar.scanner.scan.SpringProjectScanContainer.installPluginsForLanguages(SpringProjectScanContainer.java:90)
	at org.sonar.scanner.scan.SpringProjectScanContainer.doBeforeStart(SpringProjectScanContainer.java:84)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:225)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
	at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:339)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:142)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
	at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:150)
	at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:67)
	at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:53)
Caused by: java.nio.file.NoSuchFileException: /builds/sysdev/devops/pipeline-tools/container-file-creator/.sonar/_tmp/fileCache1616420913559703159.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:161)
	... 19 common frames omitted
DEBUG: Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$391/0x00007fd0e02be318@71870da7 during JVM shutdown
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: command terminated with exit code 1

Thanks for the debug logs. Unfortunately, nothing looks out of the ordinary.

I was able to reproduce the error and I’ve created a ticket internally to track this issue.

In the mean time, could you try adding -Dsonar.userHome=.scannerwork to the pysonar command?

Best,
Sebastian Zumbrunn

It works with: -Dsonar.userHome=.scannerwork

Can your customers follow this ticket or how do we know when this bug is fixed?

Awesome!

Regarding the ticket, I mixed two projects up in my head. This ticket is actually public. See SCANPY-212

Ok. However, I got an error today and yesterday when trying to watch.

Hi @lfvjimisola,
Thanks for reporting this. I’ve forwarded it internally. I’ll update the thread again when there is an update.

Best,
Sebastian Zumbrunn

1 Like

Hi @lfvjimisola,

Sorry for the delayed response. The current assessment is that this is a problem on Atlassian’s side. We’ve opened a ticket with them, and have to wait for their assessment and potential fix. In the mean time, I’m afraid I cannot offer a workaround to still be able to watch the Jira ticket.

Thanks again for raising this bug, and also the original issue.

Best,
Sebastian Zumbrunn

@sebastian.zumbrunn What is the status of the actual bug with pysonar/SonarScanner?

Hey @lfvjimisola,

The ticket is currently still in our backlog, waiting for implementation. For now, there is no concrete plan when it will be tackled. Since there is a simple workaround, it is not on the top of our priority list.

Best,
Sebastian

Ok. I think it’s a bit odd to reason like that when it’s a bug and there is an easy fix.
Just because there is a workaround should not make it a lower priority necessarily.

Every new user of pysonar will get a bad experience and if they’re unfortunate they will not be made aware of the workaround.

Hence, you can spend x amount of time to fix it or have y amount of users spent z time on finding and using the workaround.

From a user experience and c-stomer care perspective, where do SonarSource stand?

(since, I was not allowed to write “c-u-stomer care” in the forum that’s a bit of a worrying sign)

That said, it works for us with the workaround.

Hi @lfvjimisola,

You’re right that it is a easy fix and the fact that users have to discover the workaround in this forum isn’t helping either. Unfortunately, we have quite a packed schedule for the moment. Since the actual fix should be rather simple, we will try fit it in somewhere between features.

I’m glad the workaround is working for you.

Best,
Sebastian

1 Like