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

Jenkins jacoco plugin fails to when running on slave machines

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • jacoco-plugin
    • RHEL 7 linux

      Jenkins jacoco plugin fails to when running on slave machine:

      java.nio.file.AccessDeniedException: /omi/jenkins/jenkins_home/jobs/PSD2-dev-jacoco/builds/23/jacoco/sources/uk/co/ybs/ecom/ooba/authentify/AuthentifyException.java
      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:42)
      at hudson.FilePath.readFromTar(FilePath.java:2363)
      Caused: java.io.IOException: Failed to extract /ybs/u001/sw/jenkins/jenkins_slave/workingdir/workspace/PSD2-dev-jacoco/yoa/moscow/ooba/java/*/.java
      at hudson.FilePath.readFromTar(FilePath.java:2373)
      at hudson.FilePath.copyRecursiveTo(FilePath.java:2277)
      at hudson.FilePath.copyRecursiveTo(FilePath.java:2180)
      at hudson.FilePath.copyRecursiveTo(FilePath.java:2163)
      at hudson.plugins.jacoco.JacocoReportDir.saveSourcesFrom(JacocoReportDir.java:48)
      at hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:609)
      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:290)
      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)

       

      The file does exist on the Jenkins master, so it yhas obviously been pulled back/copied:

      ll /omi/jenkins/jenkins_home/jobs/PSD2-dev-jacoco/builds/23/jacoco/sources/uk/co/ybs/ecom/ooba/authentify/AuthentifyException.java

      rrr-. 1 oracle dba 635 Jun 29 15:58 /omi/jenkins/jenkins_home/jobs/PSD2-dev-jacoco/builds/23/jacoco/sources/uk/co/ybs/ecom/ooba/authentify/AuthentifyException.java

       

      As a workaround I can prevent the pluging from finding any source files, by changing 

      jacoco classPattern: 'builds/*/classes', execPattern: 'builds/jacoco//.exec', sourcePattern: 'yoa/*/java'

       

      to 

      jacoco classPattern: 'builds/*/classes', execPattern: 'builds/jacoco//*.exec', sourcePattern: ''

      surprisingly adding 

       

      , skipCopyOfSrcFiles: true

       

      does not fix the issue. Note that jacoco is running on a slave machine.

       

       

       

       

            ognjenb Ognjen Bubalo
            chris_ybs Chris Brooking
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: