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

Copy Artifact fails if selector class="hudson.plugins.copyartifact.StatusBuildSelector" is set

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: copyartifact-plugin
    • Environment:
    • Similar Issues:

      Description

      Copy artifact cannot find the artifacts of a build if "Which build" is set to "Upstream build that triggered this job".
      The configuration is ok. The copy job works fine until I change the "Which build".
      It is always reproducible.
      I learned as I ran some reproductions that this error just happens if the builds history is not located on the same machine AND not in the same instance of Jenkins.
      I have asides of a normal master/slave setup also tested what happens if the slave is on the same machine as the master (1 system, 2 different disks). Same bug.
      So a simple master installation will never run into this error. All other setups should face this issue

      The paths used are fine when looking them up on the master.
      This is unfortunately no simple fixing because the option does not address it to the master but locally
      The error also happens on 1 machine with master/slave running on it.
      It should then work if it just where about the paths as drive letter is correct and pointing to the other disc.

      There are 2 types of error messages depending on if the build containing the copy job is spawned as triggered build or via promotion.

      Output as triggered build:
      13:02:22 Deleting project workspace... [UPLOAD_Amsterdam] $ cmd /c call C:\WINDOWS\TEMP\hudson7965883506038473117.bat
      13:02:22 ReleaseLabel: 12160
      13:02:23 ERROR: Failed to copy artifacts from RB_Amsterdam with filter: zzzBuild/.zip, zzzMetaData/src/resources/IRCPanelMapping.txt
      13:02:23 hudson.util.IOException2: Failed to copy c:\Jenkins\jobs\RB_Amsterdam\builds\2012-04-20_12-39-20\archive\zzzBuild\BY_NAR_SOP8_Front.zip to c:\Jenkins_slave\workspace\UPLOAD_Amsterdam\zzzBuild\BY_NAR_SOP8_Front.zip
      13:02:23 at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:91)
      13:02:23 at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyAll(FingerprintingCopyMethod.java:63)
      13:02:23 at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:243)
      13:02:23 at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:215)
      13:02:23 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      13:02:23 at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703)
      13:02:23 at hudson.model.Build$RunnerImpl.build(Build.java:178)
      13:02:23 at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
      13:02:23 at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:473)
      13:02:23 at hudson.model.Run.run(Run.java:1413)
      13:02:23 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      13:02:23 at hudson.model.ResourceController.execute(ResourceController.java:88)
      13:02:23 at hudson.model.Executor.run(Executor.java:238)
      13:02:23 Caused by: hudson.util.IOException2: remote file operation failed: c:\Jenkins_slave\workspace\UPLOAD_Amsterdam\zzzBuild\BY_NAR_SOP8_Front.zip at hudson.remoting.Channel@15f9a23:B00015
      13:02:23 at hudson.FilePath.act(FilePath.java:828)
      13:02:23 at hudson.FilePath.act(FilePath.java:814)
      13:02:23 at hudson.FilePath.touch(FilePath.java:1160)
      13:02:23 at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:79)
      13:02:23 ... 12 more
      13:02:23 Caused by: java.io.IOException: Failed to set the timestamp of c:\Jenkins_slave\workspace\UPLOAD_Amsterdam\zzzBuild\BY_NAR_SOP8_Front.zip to 1334919183000
      13:02:23 at hudson.FilePath$19.invoke(FilePath.java:1166)
      13:02:23 at hudson.FilePath$19.invoke(FilePath.java:1160)
      13:02:23 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2154)
      13:02:23 at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      13:02:23 at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      13:02:23 at hudson.remoting.Request$2.run(Request.java:287)
      13:02:23 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      13:02:23 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      13:02:23 at java.util.concurrent.FutureTask.run(Unknown Source)
      13:02:23 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      13:02:23 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      13:02:23 at java.lang.Thread.run(Unknown Source)
      13:02:23 Build step 'Copy artifacts from another project' marked build as failure

      Output as promotion:
      Legacy code started this job. No cause information is available
      Building remotely on B00015_2 in workspace y:\Jenkins_slave\workspace\SEND_MAIL_AMSTERDAM_ASIA
      Unable to find a build for artifact copy from: RB_Amsterdam
      Build step 'Copy artifacts from another project' marked build as failure
      Notifying upstream projects of job completion
      Finished: FAILURE

        Attachments

          Issue Links

            Activity

            Hide
            kopfwunde Jan Seidel added a comment -

            Just found out that also running the job and the promotion from one installation will fail.
            I don't know if I just did miss something yesterday or what is going on. The option "Upstream build that triggered this job" fails in my case in all setup I did test. So the last scenario to reproduce would be, does this error also happen in a single instance installation.

            Show
            kopfwunde Jan Seidel added a comment - Just found out that also running the job and the promotion from one installation will fail. I don't know if I just did miss something yesterday or what is going on. The option "Upstream build that triggered this job" fails in my case in all setup I did test. So the last scenario to reproduce would be, does this error also happen in a single instance installation.
            Hide
            ikedam ikedam added a comment -

            I cannot get what you mean with "instance of Jenkins".

            Anyway, it looks caused by a file permission problem.

            Please check followings:

            • On whose authorization Jenkins slave runs.
            • Who owes zzzBuild and BY_NAR_SOP8_Front.zip

            And it may be resolved by deleting zzzBuild at the beginning of a build. Please try that.

            Show
            ikedam ikedam added a comment - I cannot get what you mean with "instance of Jenkins". Anyway, it looks caused by a file permission problem. Please check followings: On whose authorization Jenkins slave runs. Who owes zzzBuild and BY_NAR_SOP8_Front.zip And it may be resolved by deleting zzzBuild at the beginning of a build. Please try that.
            Hide
            ikedam ikedam added a comment -

            This may be the same issue to /ENKINS-11073 .
            It should be fixed with Jenkins 1.447.
            Please report your Jenkins and copyartifact versions if the problem still remains.
            I'll close this issue if no more reports in a month.

            Show
            ikedam ikedam added a comment - This may be the same issue to /ENKINS-11073 . It should be fixed with Jenkins 1.447. Please report your Jenkins and copyartifact versions if the problem still remains. I'll close this issue if no more reports in a month.
            Hide
            ikedam ikedam added a comment -

            Or maybe same to JENKINS-13515.
            It is fixed in copyartifact 1.24.

            Show
            ikedam ikedam added a comment - Or maybe same to JENKINS-13515 . It is fixed in copyartifact 1.24.
            Hide
            ikedam ikedam added a comment -

            Looks duplicate JENKINS-11073 and JENKINS-13515, and should have been already fixed in the latest version.

            Show
            ikedam ikedam added a comment - Looks duplicate JENKINS-11073 and JENKINS-13515 , and should have been already fixed in the latest version.

              People

              • Assignee:
                mindless Alan Harder
                Reporter:
                kopfwunde Jan Seidel
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: