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

CopyToSlave exception when source contain a file starting with a .dot

    Details

    • Similar Issues:

      Description

      I have a slave job with a file:

      $WORKSPACE/slave/.buildinfo

      I attempt to copy it to a directory on the master and got the following stacktrace:

      00:00:47.432 [copy-to-slave] Copying 'html/*,/html/*', excluding nothing, from 'file:/mnt/jenkins-workspace/workspace/mw-tools-releng-tox-doc-publish/' on 'hudson.slaves.DumbSlave@6c2e5320' to 'file:/srv/org/wikimedia/doc/mw-tools-releng' on the master.
      00:00:47.779 ERROR: Publisher com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier aborted due to exception
      00:00:47.780 hudson.util.IOException2: Failed to extract /mnt/jenkins-workspace/workspace/mw-tools-releng-tox-doc-publish/html/*,/html/*
      00:00:47.780 at hudson.FilePath.readFromTar(FilePath.java:2066)
      00:00:47.780 at hudson.FilePath.copyRecursiveTo(FilePath.java:1978)
      00:00:47.780 at hudson.FilePath.copyRecursiveTo(FilePath.java:1889)
      00:00:47.780 at com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier.perform(CopyToMasterNotifier.java:95)
      00:00:47.780 at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      00:00:47.781 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
      00:00:47.781 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:757)
      00:00:47.781 at hudson.model.Build$BuildExecution.post2(Build.java:183)
      00:00:47.781 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706)
      00:00:47.781 at hudson.model.Run.execute(Run.java:1690)
      00:00:47.781 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      00:00:47.782 at hudson.model.ResourceController.execute(ResourceController.java:88)
      00:00:47.782 at hudson.model.Executor.run(Executor.java:246)
      00:00:47.782 Caused by: java.io.FileNotFoundException: /srv/org/wikimedia/doc/mw-tools-releng/html/.buildinfo (No such file or directory)
      00:00:47.782 at java.io.FileOutputStream.open(Native Method)
      00:00:47.782 at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
      00:00:47.782 at java.io.FileOutputStream.<init>(FileOutputStream.java:160)
      00:00:47.783 at hudson.util.IOUtils.copy(IOUtils.java:35)
      00:00:47.783 at hudson.FilePath.readFromTar(FilePath.java:2056)
      00:00:47.783 ... 12 more
      00:00:47.789 Finished: FAILURE

        Attachments

          Activity

          Hide
          svvivek Vivekanand SV added a comment -

          Hi,

          The file u mentioned first "WORKSPACE/slave/.buildinfo" is different from the file "/srv/org/wikimedia/doc/mw-tools-releng/html/.buildinfo (No such file or directory)". if that file is in slave folder then include slave instead of html.

          Vivek.

          Show
          svvivek Vivekanand SV added a comment - Hi, The file u mentioned first "WORKSPACE/slave/.buildinfo" is different from the file "/srv/org/wikimedia/doc/mw-tools-releng/html/.buildinfo (No such file or directory)". if that file is in slave folder then include slave instead of html. Vivek.
          Hide
          hashar Antoine Musso added a comment -

          I have inserted /slave/ by mistake while doing the bug report.

          After some more investigation, it seems the issue is because of some file permissions (the copy is made by the jenkins master to a directory owned by the jenkins slave on that machine).

          Will look at it again and might well close this bug.

          Show
          hashar Antoine Musso added a comment - I have inserted /slave/ by mistake while doing the bug report. After some more investigation, it seems the issue is because of some file permissions (the copy is made by the jenkins master to a directory owned by the jenkins slave on that machine). Will look at it again and might well close this bug.
          Hide
          hashar Antoine Musso added a comment -

          Turned out to be a file permission issue. The jenkins user could not write to the destination and the error message 'No such file or directory' made it very confusing.

          Everything for me now :-]

          Show
          hashar Antoine Musso added a comment - Turned out to be a file permission issue. The jenkins user could not write to the destination and the error message 'No such file or directory' made it very confusing. Everything for me now :-]

            People

            • Assignee:
              svvivek Vivekanand SV
              Reporter:
              hashar Antoine Musso
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: