Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-1139

CLONE - Post Build deployment fails with HTTP 403 Forbidden

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: 1 - Blocker
    • Resolution: Unresolved
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: Maven3
    • Environment:

      Jenkins 1.553 with Artifactory Plugin 2.2.1 running on RHEL 6.5

      Description

      This is a new setup to integrate Artifactory with Jenkins as the Maven repository. Builds from the command line are successful, and do deploy to Artifactory. But builds with Jenkins fail to deploy.

      The relevent trace:

      [INFO] Deploying artifact: http://myserver:8081/artifactory/libs-release-local/net/mydomain/Utils/1.0/Utils-1.0.jar
      [ERROR] org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded() listener has failed: 
      java.lang.RuntimeException: Error occurred while publishing artifact to Artifactory: /var/lib/jenkins/jobs/MyApp/workspace/Utils/target/Utils-1.0.jar.
       Skipping deployment of remaining artifacts (if any) and build info.
      	at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deployArtifacts(BuildDeploymentHelper.java:272)
      	at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deploy(BuildDeploymentHelper.java:108)
      	at org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded(BuildInfoRecorder.java:139)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:64)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:170)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
      	at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
      	at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:328)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:744)
      Caused by: java.io.IOException: Failed to deploy file: HTTP response code: 403. HTTP response message: Forbidden
      	at org.jfrog.build.client.ArtifactoryBuildInfoClient.throwHttpIOException(ArtifactoryBuildInfoClient.java:644)
      	at org.jfrog.build.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:519)
      	at org.jfrog.build.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:294)
      	at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deployArtifacts(BuildDeploymentHelper.java:270)
      	... 29 more
      [ERROR] Internal error: java.lang.RuntimeException: org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded() listener has failed: Error occurred while publishing artifact to Artifactory: /var/lib/jenkins/jobs/MyApp/workspace/Utils/target/Utils-1.0.jar.
      [ERROR] Skipping deployment of remaining artifacts (if any) and build info. Failed to deploy file: HTTP response code: 403. HTTP response message: Forbidden
      [ERROR] -> [Help 1]
      org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded() listener has failed: 
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:164)
      	at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
      	at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:328)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:744)
      Caused by: java.lang.RuntimeException: org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded() listener has failed: 
      	at org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded(BuildInfoRecorder.java:150)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:64)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:170)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
      	... 22 more
      Caused by: java.lang.RuntimeException: Error occurred while publishing artifact to Artifactory: /var/lib/jenkins/jobs/MyApp/workspace/Utils/target/Utils-1.0.jar.
       Skipping deployment of remaining artifacts (if any) and build info.
      	at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deployArtifacts(BuildDeploymentHelper.java:272)
      	at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deploy(BuildDeploymentHelper.java:108)
      	at org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded(BuildInfoRecorder.java:139)
      	... 27 more
      Caused by: java.io.IOException: Failed to deploy file: HTTP response code: 403. HTTP response message: Forbidden
      	at org.jfrog.build.client.ArtifactoryBuildInfoClient.throwHttpIOException(ArtifactoryBuildInfoClient.java:644)
      	at org.jfrog.build.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:519)
      	at org.jfrog.build.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:294)
      	at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deployArtifacts(BuildDeploymentHelper.java:270)
      	... 29 more
      

        Attachments

          Activity

            People

            Assignee:
            yossis Yossi Shaul
            Reporter:
            JBTwc Jay Burrill (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: