Uploaded image for project: 'SonarQube Scanner API'
  1. SonarQube Scanner API
  2. SCANNERAPI-128

Errors with user cache on network disk

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: API
    • Labels:
      None

      Description

      Discussion thread at http://sonarqube.15.x6.nabble.com/sonar-dev-Automated-build-with-TFS-Custom-Template-td5032040.html

      Runner fails to add files to user cache when using a network disk:

      Error reported in the Sonar Process: ERROR: Error during Sonar runner execution
      org.sonar.runner.impl.RunnerException: Unable to execute Sonar
      at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
      at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
      at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
      at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
      at org.sonar.runner.api.Runner.execute(Runner.java:100)
      at org.sonar.runner.Main.executeTask(Main.java:70)
      at org.sonar.runner.Main.execute(Main.java:59)
      at org.sonar.runner.Main.main(Main.java:53)
      Caused by: java.lang.IllegalStateException: Fail to move C:\Windows\ServiceProfiles\NetworkService\.sonar\cache\_tmp\fileCache8582988126579606506.tmp to C:\Windows\ServiceProfiles\NetworkService\.sonar\cache\d46bee27cf0e82928a8e31fa07eca5a6\sonar-scm-git-plugin-5.0.jar
      at org.sonar.home.cache.FileCache.renameQuietly(FileCache.java:116)
      at org.sonar.home.cache.FileCache.get(FileCache.java:94)
      at org.sonar.batch.bootstrap.DefaultPluginsReferential.pluginFile(DefaultPluginsReferential.java:58)
      at org.sonar.batch.bootstrap.BatchPluginRepository.doStart(BatchPluginRepository.java:89)
      at org.sonar.batch.bootstrap.BatchPluginRepository.start(BatchPluginRepository.java:72)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
      at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
      at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
      at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
      at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
      at org.picocontainer.behaviors.Stored.start(Stored.java:110)
      at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015)
      at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008)
      at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766)
      at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
      at org.sonar.batch.bootstrapper.Batch.start(Batch.java:81)
      at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
      at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
      ... 9 more
      Caused by: java.io.IOException: Failed to delete original file 'C:\Windows\ServiceProfiles\NetworkService\.sonar\cache\_tmp\fileCache8582988126579606506.tmp' after copy to 'C:\Windows\ServiceProfiles\NetworkService\.sonar\cache\d46bee27cf0e82928a8e31fa07eca5a6\sonar-scm-git-plugin-5.0.jar'
      at org.apache.commons.io.FileUtils.moveFile(FileUtils.java:2835)
      at org.sonar.home.cache.FileCache.renameQuietly(FileCache.java:114)
      

      .sonar and its cache folders are all being created just fine. Also the .tmp files created have the correct permissions, so should be movable/deleteable.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            simon.brandhof Simon Brandhof (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: