bamboo-artifactory-plugin icon indicating copy to clipboard operation
bamboo-artifactory-plugin copied to clipboard

409. HTTP response message: Conflict

Open jeeftor opened this issue 9 years ago • 4 comments

I'm a little confused as to what is going on. I'm using bamboo and plugin version 1.7.5

I can do a manual upload with curl no problem - but using the artifactory plugin directly is giving me 409 HTTP errors and I can't figure out how to figure out what this "conflict" is. Could somebody provide some guidance as to what I should be looking for or how to fix this?

Oh - I'm using a Generic Deploy task also - as I'm trying to upload some zip files.

    Exception occurred while executing task
15-Feb-2016 06:00:08    java.io.IOException: Failed to deploy file: HTTP response code: 409. HTTP response message: Conflict
15-Feb-2016 06:00:08            at org.jfrog.build.client.ArtifactoryBuildInfoClient.throwHttpIOException(ArtifactoryBuildInfoClient.java:661)
15-Feb-2016 06:00:08            at org.jfrog.build.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:532)
15-Feb-2016 06:00:08            at org.jfrog.build.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:303)
15-Feb-2016 06:00:08            at org.jfrog.bamboo.task.ArtifactoryGenericDeployTask.deploy(ArtifactoryGenericDeployTask.java:177)
15-Feb-2016 06:00:08            at org.jfrog.bamboo.task.ArtifactoryGenericDeployTask.execute(ArtifactoryGenericDeployTask.java:90)
15-Feb-2016 06:00:08            at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:216)
15-Feb-2016 06:00:08            at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:102)
15-Feb-2016 06:00:08            at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:75)
15-Feb-2016 06:00:08            at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:188)
15-Feb-2016 06:00:08            at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:112)
15-Feb-2016 06:00:08            at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:110)
15-Feb-2016 06:00:08            at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
15-Feb-2016 06:00:08            at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
15-Feb-2016 06:00:08            at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
15-Feb-2016 06:00:08            at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
15-Feb-2016 06:00:08            at java.lang.Thread.run(Thread.java:745)

jeeftor avatar Feb 15 '16 11:02 jeeftor

Hi @jeeftor, The best way to find the cause of the conflict is to look for the 409 response in the Artifactory logs. Artifactory should return the same response for the PUT requests sent from curl and the plugin. I suggest you compare the two requests as they are printed in the logs. Please let us know if this helps.

eyalbe4 avatar Feb 15 '16 13:02 eyalbe4

Hi @jeeftor In the artifactory plugin I had the same issue, the problem was that I had specified a wrong snapshot repository where I didn't had the rights, maybe this helps you kr

mortias avatar Nov 03 '16 08:11 mortias

For me the problem was i didnt assemble new aar and tried to send the old one

ovictorpinto avatar Apr 10 '18 16:04 ovictorpinto

The HTTP 409 can happen when you try to upload a .jar with some information (e.g. version) but it already has a conflicting jar inside.

OndraZizka avatar Sep 19 '19 12:09 OndraZizka