java.lang.IllegalStateException: Fail to create temp file in .sonar_cache/cache/_tmp

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) Spring boot gradle Plugin 3.0
  • how is SonarQube deployed: zip, Docker, Helm - installed as plugin in spring boot java code
  • what are you trying to achieve - Push from giltab to sonarqube server
  • what have you tried so far to achieve this- debugging using --stacktrace in gitlab

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Caused by: java.lang.IllegalStateException: Fail to create temp file in .sonar_cache/cache/_tmp

422 at org.sonarsource.scanner.api.internal.cache.FileCache.newTempFile(FileCache.java:138)

at org.sonarsource.scanner.api.internal.cache.FileCache.get(FileCache.java:83)
org.sonarsource.scanner.api.internal.JarDownloader.lambda$getScannerEngineFiles$0(JarDownloader.java:60)

at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:61)

426 at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)

at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)

226 more
Caused by: java.nio.file.NoSuchFileException: .sonar_cache/cache/_tmp/fileCache16905254980407141020.tmp
at org.sonarsource.scanner.api.internal.cache.FileCache.newTempFile(FileCache.java:136)

Hi,

Welcome to the community!

Off-hand this sounds like either a permissions problem - analysis can’t create the files it needs - or a problem of some other process “cleaning up” files that analysis is still trying to use. You don’t have a virus scanner or something like that running on the build agent, do you?

 
Ann