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
Community showcase
Published Monday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

490 views 0 9
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