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

Artifact and Artifact checksum deploy order required otherwise artifactory Error 404

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • artifactory-plugin
    • None
    • Jenkins Version: 1.565.3
      Artifactory Plugin Version: 2.2.4
      Artifactory Version: 3.2.0

      When deploying artifacts and the artifacts checksum to Artifactory, the artifact itself must be uploaded before it's checksum. Otherwise Artifactory will return with an Error 404 and consequently failing the job:
      05:57:24 Deploying artifact: http://artifactory:8081/artifactory/repository/artifact.rpm.md5
      05:57:24 ERROR: remote file operation failed: /root/workspace/job at hudson.remoting.Channel@2c03b560:hostname
      05:57:24 java.io.IOException: remote file operation failed: /root/workspace/job at hudson.remoting.Channel@2c03b560:hostname
      05:57:24 at hudson.FilePath.act(FilePath.java:916)
      05:57:24 at hudson.FilePath.act(FilePath.java:893)
      05:57:24 at org.jfrog.hudson.generic.GenericArtifactsDeployer.deploy(GenericArtifactsDeployer.java:82)
      05:57:24 at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator$1.tearDown(ArtifactoryGenericConfigurator.java:276)
      05:57:24 at hudson.model.Build$BuildExecution.doRun(Build.java:170)
      05:57:24 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
      05:57:24 at hudson.model.Run.execute(Run.java:1706)
      05:57:24 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      05:57:24 at hudson.model.ResourceController.execute(ResourceController.java:88)
      05:57:24 at hudson.model.Executor.run(Executor.java:232)
      05:57:24 Caused by: java.io.IOException: Failed to deploy file: HTTP response code: 404. HTTP response message: Not Found
      05:57:24 at org.jfrog.build.client.ArtifactoryBuildInfoClient.throwHttpIOException(ArtifactoryBuildInfoClient.java:652)
      05:57:24 at org.jfrog.build.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:527)
      05:57:24 at org.jfrog.build.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:302)
      05:57:24 at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.deploy(GenericArtifactsDeployer.java:182)
      05:57:24 at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:154)
      05:57:24 at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:122)
      05:57:24 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2474)
      05:57:24 at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      05:57:24 at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      05:57:24 at hudson.remoting.Request$2.run(Request.java:328)
      05:57:24 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      05:57:24 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      05:57:24 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      05:57:24 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
      05:57:24 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      05:57:24 at java.lang.Thread.run(Thread.java:701)

      Versus the proper order returns a successful deploy and successful job:
      05:40:14 Deploying artifact: http://artifactory:8081/artifactory/repository/artifact.rpm
      05:40:38 Deploying artifact: http://artifactory:8081/artifactory/repository/artifact.rpm.md5
      05:40:38 Deploying build info to: http://artifactory:8081/artifactory/api/build
      05:40:39 Finished: SUCCESS

      Same Jenkins, Artifactory, Build Host, Code Base, and git checksum in both instances. The only difference was artifact deployment order. Either force checksum files to be uploaded last, or allow the user to specify priority order of artifact deployment.

          [JENKINS-25260] Artifact and Artifact checksum deploy order required otherwise artifactory Error 404

          Ethan Spoelstra added a comment - - edited

          It is possible to specify the artifact's checksums while uploading rather than adding an additional file. Artifactory should automatically create the checksum files on your behalf if you supply a checksum while uploading or use the Artifactory plugin.

          Ethan Spoelstra added a comment - - edited It is possible to specify the artifact's checksums while uploading rather than adding an additional file. Artifactory should automatically create the checksum files on your behalf if you supply a checksum while uploading or use the Artifactory plugin.

          Will Saxon added a comment - - edited

          We just ran into this today, investigating the Jenkins plugin 'Generic integration' vs. the 'AntIvy integration' since the latter is causing other problems with another tool we use.

          We used Ivy to publish to a local path in the workspace, then used the Generic integration to send everything under $(WORKSPACE)/localPath/** to Artifactory. This was failing with the 404 above. Since we know the file extensions for our artifacts are going to be .zip and .xml, we just changed the artifacts to be $(WORKSPACE)/localPath/*/.zip and $(WORKSPACE)/localPath/*/.xml instead. This bypasses the error at the expense of putting more configuration in Jenkins.

          Also note this is still an issue with Jenkins 1.651.1, Artifactory 4.8.2 and the Artifactory plugin 2.4.7.

          Will Saxon added a comment - - edited We just ran into this today, investigating the Jenkins plugin 'Generic integration' vs. the 'AntIvy integration' since the latter is causing other problems with another tool we use. We used Ivy to publish to a local path in the workspace, then used the Generic integration to send everything under $(WORKSPACE)/localPath/** to Artifactory. This was failing with the 404 above. Since we know the file extensions for our artifacts are going to be .zip and .xml, we just changed the artifacts to be $(WORKSPACE)/localPath/* / .zip and $(WORKSPACE)/localPath/* / .xml instead. This bypasses the error at the expense of putting more configuration in Jenkins. Also note this is still an issue with Jenkins 1.651.1, Artifactory 4.8.2 and the Artifactory plugin 2.4.7.

          Hi,

          Any updates on this issue, i am facing the same issue with Jenkins Maven Project, below are the other details, any workaround for this issue and will upgrade of any of the below tools fix this issue. This is a blocker for the build pipeline.

          Jenkins : Jenkins ver. 1.624
          Artifactory Plugin : 2.7.2
          Artifactory : 3.0.2

          Madhusudhanan Elangovan added a comment - Hi, Any updates on this issue, i am facing the same issue with Jenkins Maven Project, below are the other details, any workaround for this issue and will upgrade of any of the below tools fix this issue. This is a blocker for the build pipeline. Jenkins : Jenkins ver. 1.624 Artifactory Plugin : 2.7.2 Artifactory : 3.0.2

            eyalbe Eyal Ben Moshe
            ddewey Daniel Dewey
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: