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

CopyArtifact plugin cannot always copy artifacts

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Duplicate
    • Component/s: copyartifact-plugin, core
    • Labels:
      None
    • Environment:
      Jenkins Windows 1.486. CopyArtifact v1.23
    • Similar Issues:

      Description

      Several of our jobs will intermittently fail. Examination of the logs show the same problem:

      (SAMPLE)
      08:55:39 Unable to find a build for artifact copy from: BUILD_WINDOWS_ALL
      08:55:39 Build step 'Copy artifacts from another project' marked build as failure

      That's all that is in the console. We haven't upgraded to CopyArtifact v1.24 (the only fix was for Jenkins master running on Unix, which we are not).

      The problem is highly intermittent. We've gone for days without having the problem, then get numerous occurrences (perhaps 20 out of 200 similar jobs being run). These problems begin after the the job lazy-load was introduced into Jenkins core. Given the nature of the failures and the environment at the time of the failures, it may be a locking/race problem with several jobs all trying to access the same artifacts from the same source build at the same time.

      If there anything else that I can provide to resolve this issue.

        Attachments

          Issue Links

            Activity

            Hide
            jswager1 Jason Swager added a comment -

            Some additional information: I've confirmed that when the failure occurs, the source job/build of the artifacts DOES exist. I just had some jobs run where 20 jobs all referenced the same job/build to download artifacts from; 5 worked and got the artifacts, the other 15 failed to download any artifacts and eventually failed due to the missing files.

            Show
            jswager1 Jason Swager added a comment - Some additional information: I've confirmed that when the failure occurs, the source job/build of the artifacts DOES exist. I just had some jobs run where 20 jobs all referenced the same job/build to download artifacts from; 5 worked and got the artifacts, the other 15 failed to download any artifacts and eventually failed due to the missing files.
            Hide
            harisshahid Haris Shahid added a comment - - edited

            I would like to add that I have also been experiencing this issue and after doing some extensive tinkering I think it has to do something with permissions. At first I tried giving the job from which the artifacts were to be copied all types of access (anonymous, full access, authenticated group access) anything I read and could come up with on my own I tried. But, the copy artifact plugin would still fail intermittently.

            The solution I figured out is this; if the copy artifact plugin starts to fail just go to the view that lists the job from which artifacts are to be copied as long as the logged in user sees the job listing, once, the copy artifact plugin will not fail (to copy artifacts) ever again for the current session. You do not even have to click on the job just be able to see it in a list in one of your views. I know this sounds strange but I assure you this fixes the problem. Currently I have created a view where I list all of the jobs from which artifacts are to be copied and I have made it my default view. So, now as soon as a user logs-in or hits the Jenkins homepage the first thing they will see is the list of jobs. I have not had a failure since and I implemented this fix about 1.5 - 2 months ago.

            Can someone please fix this?

            Thanks.

            Show
            harisshahid Haris Shahid added a comment - - edited I would like to add that I have also been experiencing this issue and after doing some extensive tinkering I think it has to do something with permissions. At first I tried giving the job from which the artifacts were to be copied all types of access (anonymous, full access, authenticated group access) anything I read and could come up with on my own I tried. But, the copy artifact plugin would still fail intermittently. The solution I figured out is this; if the copy artifact plugin starts to fail just go to the view that lists the job from which artifacts are to be copied as long as the logged in user sees the job listing, once, the copy artifact plugin will not fail (to copy artifacts) ever again for the current session. You do not even have to click on the job just be able to see it in a list in one of your views. I know this sounds strange but I assure you this fixes the problem. Currently I have created a view where I list all of the jobs from which artifacts are to be copied and I have made it my default view. So, now as soon as a user logs-in or hits the Jenkins homepage the first thing they will see is the list of jobs. I have not had a failure since and I implemented this fix about 1.5 - 2 months ago. Can someone please fix this? Thanks.
            Hide
            jswager1 Jason Swager added a comment -

            I don't think this is a case of permissions. I think this is a case of the job/build lazy-load not yet loading the build in question. Similar issues have been happening with Build URLs. You can paste the URL of a build into a browser and Jenkins responds with a 404. But if you go into Jenkins, locate the job, then drill down to the build, it always works. Then pasting the URL will work.

            Show
            jswager1 Jason Swager added a comment - I don't think this is a case of permissions. I think this is a case of the job/build lazy-load not yet loading the build in question. Similar issues have been happening with Build URLs. You can paste the URL of a build into a browser and Jenkins responds with a 404. But if you go into Jenkins, locate the job, then drill down to the build, it always works. Then pasting the URL will work.
            Hide
            mtscout6 Matthew Smith added a comment -

            We were seeing this issue on occasion, and yesterday we updated to Jenkins 1.502. With that change the rate of this error has dramatically increased. We are seeing this occur on roughly 40% of the builds copying artifacts.

            Show
            mtscout6 Matthew Smith added a comment - We were seeing this issue on occasion, and yesterday we updated to Jenkins 1.502. With that change the rate of this error has dramatically increased. We are seeing this occur on roughly 40% of the builds copying artifacts.
            Hide
            jglick Jesse Glick added a comment -

            @harisshahid: maybe you are encountering JENKINS-13222, not sure.

            Show
            jglick Jesse Glick added a comment - @harisshahid: maybe you are encountering JENKINS-13222 , not sure.
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            I think this is the same issue as JENKINS-15589, which in turn is caused by JENKINS-15587.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - I think this is the same issue as JENKINS-15589 , which in turn is caused by JENKINS-15587 .

              People

              • Assignee:
                kohsuke Kohsuke Kawaguchi
                Reporter:
                jswager1 Jason Swager
              • Votes:
                3 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: