Unable to publish artifact - [BambooArtifactHttpTransport] Unexpected HTTP status code: HTTP/1.1 411 Length Required

We are building an Android app with Bamboo. Everything works fine except that the Android .apk file cannot be published.

 

Looking at the agent log we can see the following:

INFO   | jvm 1    | 2015/10/30 10:16:06 | 2015-10-30 10:16:06,957 INFO [2-BAM::myagent.com::Agent:pool-5-thread-1] [ExecuteBuildTask] Running post build plugin 'Artifact Copier'


INFO   | jvm 1    | 2015/10/30 10:16:07 | 2015-10-30 10:16:06,960 INFO [2-BAM::myagent.com::Agent:pool-5-thread-1] [BuildArtifactPostProcessor] Copying the build artifacts for build: PRO-APPANDROID12-JOB1-2

INFO   | jvm 1    | 2015/10/30 10:16:07 | 2015-10-30 10:16:06,979 INFO [2-BAM::myagent.com::Agent:pool-5-thread-1] [AbstractArtifactManager] Publishing [APK] for PRO-APPANDROID12-JOB1-2: 6 file(s) matching [**/*.apk] in directory /home/user/bamboo-agent-home/xml-data/build-dir/PRO-APPANDROID12-JOB1/pro-android-app/build/outputs

INFO   | jvm 1    | 2015/10/30 10:16:07 | 2015-10-30 10:16:07,007 INFO [2-BAM::myagent.com::Agent:pool-5-thread-1] [AbstractArtifactManager] Trying to publish the artifact with handler: com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler

INFO   | jvm 1    | 2015/10/30 10:16:33 | 2015-10-30 10:16:33,575 INFO [2-BAM::myagent.com::Agent:pool-5-thread-1] [BambooArtifactHttpTransport] Finished writing the artifact to the output stream.

INFO   | jvm 1    | 2015/10/30 10:16:33 | 2015-10-30 10:16:33,577 INFO [2-BAM::myagent.com::Agent:pool-5-thread-1] [BambooArtifactHttpTransport] Content-Description: Artifact [APK] for PRO-APPANDROID12-JOB1-2X-Bamboo-AuthenticationToken: 02c5c41easdcf2cbfcea8558a322104e11255f065

INFO   | jvm 1    | 2015/10/30 10:16:33 | 2015-10-30 10:16:33,578 ERROR [2-BAM::myagent.com::Agent:pool-5-thread-1] [BambooArtifactHttpTransport] Unexpected HTTP status code: HTTP/1.1 411 Length Required

INFO   | jvm 1    | 2015/10/30 10:16:33 | 2015-10-30 10:16:33,578 INFO [2-BAM::myagent.com::Agent:pool-5-thread-1] [AbstractArtifactManager] Handler com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler did not publish the artifact

INFO   | jvm 1    | 2015/10/30 10:16:33 | 2015-10-30 10:16:33,581 WARN [2-BAM::myagent.com::Agent:pool-5-thread-1] [AbstractArtifactManager] Unable to publish artifact [APK]:

 

I guess the problem is related to this log entry:

[BambooArtifactHttpTransport] Unexpected HTTP status code: HTTP/1.1 411 Length Required

What could be wrong?

1 answer

1 vote

The reverse proxy you're fronting your Bamboo server with does not support chunked encoding or is not configured to accept chunked encoding. Either fix that, or point the agent directly at the Tomcat port of your Bamboo server (you can edit the URL in bamboo-agent-home/conf/wrapper.conf)

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,576 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you