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

Invalid symbolic links get archived but cannot be copied using Copy Artifacts

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The copyartifact plugin fails to properly handle symlinks from a slave machine. When you create the symlink and archive it, the symlink returns a 404, and anything that tries to Copy Archive from the above project throws an exception.

      Steps to reproduce:
      Create a SLAVE NODE on a linux instance
      Create a Job (fooProject) that has `Execute ssh` with the following

      mkdir -p foo 
      echo $BUILD_TAG > foo/bar 
      ln -s $( readlink -f foo/bar ) foo/baz
      

      Then Archive the Artifacts on `foo/**`
      Execute job
      Create a new project (barProject)
      Copy artifacts from project (fooProject)
      Execute and you will receive the following stack trace below:

      ERROR: Failed to copy artifacts from tets with filter: **
      hudson.util.IOException2: Failed to copy /Users/Shared/Jenkins/Home/jobs/tets/builds/2014-03-31_17-56-04/archive/foo/baz to /tmp/workspace/tets2/foo/baz
      	at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:107)
      	at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyAll(FingerprintingCopyMethod.java:68)
      	at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:368)
      	at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:306)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:781)
      	at hudson.model.Build$BuildExecution.build(Build.java:199)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:562)
      	at hudson.model.Run.execute(Run.java:1665)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:246)
      Caused by: java.io.FileNotFoundException: /Users/Shared/Jenkins/Home/jobs/tets/builds/2014-03-31_17-56-04/archive/foo/baz (No such file or directory)
      	at java.io.FileInputStream.open(Native Method)
      	at java.io.FileInputStream.<init>(FileInputStream.java:138)
      	at hudson.FilePath$34.invoke(FilePath.java:1797)
      	at hudson.FilePath$34.invoke(FilePath.java:1792)
      	at hudson.FilePath.act(FilePath.java:916)
      	at hudson.FilePath.act(FilePath.java:889)
      	at hudson.FilePath.copyTo(FilePath.java:1792)
      	at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:79)
      	... 12 more
      Build step 'Copy artifacts from another project' marked build as failure
      Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

            Hide
            ingorichter Ingo Richter added a comment -

            I ran into this issue a couple of days ago, when a job suddenly started to fail.
            Does anybody know what has changed in this particular area that causes this feature not to work properly anymore? I'm curious how symbolic links have been handled before.

            Show
            ingorichter Ingo Richter added a comment - I ran into this issue a couple of days ago, when a job suddenly started to fail. Does anybody know what has changed in this particular area that causes this feature not to work properly anymore? I'm curious how symbolic links have been handled before.
            Hide
            danielbeck Daniel Beck added a comment -

            Ingo: Did you recently update to 1.554 or higher, which includes the fix to JENKINS-21958?

            Show
            danielbeck Daniel Beck added a comment - Ingo: Did you recently update to 1.554 or higher, which includes the fix to JENKINS-21958 ?
            Hide
            ingorichter Ingo Richter added a comment -

            Daniel: Sorry, I haven't gotten any notification on this update. Yes, I have updated to a more recent version. That's what I usually do to keep up with improvements and fixes to Jenkins.
            Today I started to investigate a build failure and it's exactly this issue.

            Show
            ingorichter Ingo Richter added a comment - Daniel: Sorry, I haven't gotten any notification on this update. Yes, I have updated to a more recent version. That's what I usually do to keep up with improvements and fixes to Jenkins. Today I started to investigate a build failure and it's exactly this issue.
            Hide
            ingorichter Ingo Richter added a comment -

            My current setup is a Matrix job that runs on OSX and Windows. The job fails only on OSX when trying to copy the archived artifacts.

            Show
            ingorichter Ingo Richter added a comment - My current setup is a Matrix job that runs on OSX and Windows. The job fails only on OSX when trying to copy the archived artifacts.
            Hide
            danielbeck Daniel Beck added a comment -

            Please check whether all symbolic links on the OS X node are valid.

            Show
            danielbeck Daniel Beck added a comment - Please check whether all symbolic links on the OS X node are valid.
            Hide
            ikedam ikedam added a comment -

            Fixed in copyartifact-1.35.
            It will be available in a day.

            Show
            ikedam ikedam added a comment - Fixed in copyartifact-1.35. It will be available in a day.

              People

              • Assignee:
                Unassigned
                Reporter:
                schristou Steven Christou
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: