Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50569

AccessDeniedException when copying VCS dir

XMLWordPrintable

      Some times LastChanges throws java.nio.file.AccessDeniedException at this line:

       vcsTargetDir = new FilePath(new File(workspaceTargetDir.getRemote() + "/.svn"));
       vcsDirFound.copyRecursiveTo("**/*", vcsTargetDir); //here is where the exception is raised
      

      It looks like it is related to slave, need to confirm that. Following is full stacktrace:

      java.nio.file.AccessDeniedException: /var/procergs/build-tools/jenkins/jobs/apm-pipeline/builds/34/.svn/all-wcprops
       	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
       	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
       	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
       	at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
       	at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
       	at java.nio.file.Files.newOutputStream(Files.java:216)
       	at hudson.util.IOUtils.copy(IOUtils.java:39)
       	at hudson.FilePath.readFromTar(FilePath.java:2307)
       Caused: java.io.IOException: Failed to extract /var/procergs/build-tools-2/workspace/apm-pipeline/.svn/**/*
       	at hudson.FilePath.readFromTar(FilePath.java:2317)
       	at hudson.FilePath.copyRecursiveTo(FilePath.java:2221)
       	at hudson.FilePath.copyRecursiveTo(FilePath.java:2124)
       	at hudson.FilePath.copyRecursiveTo(FilePath.java:2107)
       	at com.github.jenkins.lastchanges.LastChangesPublisher.perform(LastChangesPublisher.java:169)
       	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
       	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
       	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)
       	at hudson.security.ACL.impersonate(ACL.java:260)
       	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)
       	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
       	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       	at java.lang.Thread.run(Thread.java:748)
      

      Environment:
      Jenkins 2.89.3
      LastChanges 2.6.1

            rmpestano Rafael Pestano
            rmpestano Rafael Pestano
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: