java.lang.RuntimeException: java.io.IOException: Unexpected HTTP status code: HTTP/1.1 401 Unauthorized

Atlassian JIRA | Martin Meinhold | 2 years ago
  1. 0

    Yesterday a couple of our builds had hanging jobs (which I guess is another problem); this morning I came in and the hanging jobs were marked as grey: !some-build-is-grey.png|width=700px! But for unknown reason, Bamboo thinks this build was successful !but-build-result-is-still-green.png|width=700px! That's clearly wrong. It should have marked the build as incomplete but never as successful. Especially considering this could have started a deployment project. Note: the following system error was reported for the incomplete jobs: {noformat} java.lang.RuntimeException: java.io.IOException: Unexpected HTTP status code: HTTP/1.1 401 Unauthorized at com.atlassian.bamboo.v2.build.agent.remote.sender.HttpMessageSender.send(HttpMessageSender.java:135) at com.atlassian.bamboo.v2.build.agent.remote.RemoteArtifactManager.markSubscriptionAsConsumed(RemoteArtifactManager.java:28) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager.retrieve(AbstractArtifactManager.java:320) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.prepareArtifacts(PrepareBuildTask.java:156) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:100) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:188) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:112) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:110) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: Unexpected HTTP status code: HTTP/1.1 401 Unauthorized at com.atlassian.bamboo.v2.build.agent.remote.sender.HttpMessageSender.send(HttpMessageSender.java:129) ... 12 more {noformat}

    Atlassian JIRA | 2 years ago | Martin Meinhold
    java.lang.RuntimeException: java.io.IOException: Unexpected HTTP status code: HTTP/1.1 401 Unauthorized
  2. 0

    Yesterday a couple of our builds had hanging jobs (which I guess is another problem); this morning I came in and the hanging jobs were marked as grey: !some-build-is-grey.png|width=700px! But for unknown reason, Bamboo thinks this build was successful !but-build-result-is-still-green.png|width=700px! That's clearly wrong. It should have marked the build as incomplete but never as successful. Especially considering this could have started a deployment project. Note: the following system error was reported for the incomplete jobs: {noformat} java.lang.RuntimeException: java.io.IOException: Unexpected HTTP status code: HTTP/1.1 401 Unauthorized at com.atlassian.bamboo.v2.build.agent.remote.sender.HttpMessageSender.send(HttpMessageSender.java:135) at com.atlassian.bamboo.v2.build.agent.remote.RemoteArtifactManager.markSubscriptionAsConsumed(RemoteArtifactManager.java:28) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager.retrieve(AbstractArtifactManager.java:320) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.prepareArtifacts(PrepareBuildTask.java:156) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:100) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:188) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:112) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:110) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: Unexpected HTTP status code: HTTP/1.1 401 Unauthorized at com.atlassian.bamboo.v2.build.agent.remote.sender.HttpMessageSender.send(HttpMessageSender.java:129) ... 12 more {noformat}

    Atlassian JIRA | 2 years ago | Martin Meinhold
    java.lang.RuntimeException: java.io.IOException: Unexpected HTTP status code: HTTP/1.1 401 Unauthorized
  3. 0

    The build failed because the agent couldn't download the artifact from the Bamboo server: {noformat} 2014-05-28 05:02:09,575 INFO [2-BAM::agent-18-11.buildeng.atlassian.com (2)::Agent:pool-6-thread-1] [PrepareBuildTask] Executing build JIRA JDK8 Plans - CI Functional Tests - Java 8 - Func 07 #131 (JJDK8-FUNCJ8-F07-131) 2014-05-28 05:02:09,575 INFO [2-BAM::agent-18-11.buildeng.atlassian.com (2)::Agent:pool-6-thread-1] [PrepareBuildTask] Preparing artifact for use: hallelujah-dist 2014-05-28 05:02:09,634 WARN [2-BAM::agent-18-11.buildeng.atlassian.com (2)::Agent:pool-6-thread-1] [HttpMethodDirector] Unable to respond to any of these challenges: {oauth=OAuth realm="https%3A%2F%2Fjira-bamboo.internal.atlassian.com"} 2014-05-28 05:02:09,634 ERROR [2-BAM::agent-18-11.buildeng.atlassian.com (2)::Agent:pool-6-thread-1] [HttpMessageSender] Failed to send message. java.io.IOException: Unexpected HTTP status code: 401 Unauthorized at com.atlassian.bamboo.v2.build.agent.remote.sender.HttpMessageSender.send(HttpMessageSender.java:105) at com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler.internalRetrieve(BambooRemoteArtifactHandler.java:74) at com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler.retrieve(BambooRemoteArtifactHandler.java:53) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager$3.call(AbstractArtifactManager.java:341) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager$3.call(AbstractArtifactManager.java:335) at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:86) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager.retrieveArtifact(AbstractArtifactManager.java:334) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager.retrieve(AbstractArtifactManager.java:294) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.prepareArtifacts(PrepareBuildTask.java:150) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:98) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:183) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:111) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:110) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:662) 2014-05-28 05:02:09,635 ERROR [2-BAM::agent-18-11.buildeng.atlassian.com (2)::Agent:pool-6-thread-1] [BambooPluginUtils] Unable to retrieve artifact hallelujah-dist for JJDK8-FUNCJ8-F07-131 via com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler@4fb22e7b java.lang.RuntimeException: java.io.IOException: Unexpected HTTP status code: 401 Unauthorized at com.atlassian.bamboo.v2.build.agent.remote.sender.HttpMessageSender.send(HttpMessageSender.java:111) at com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler.internalRetrieve(BambooRemoteArtifactHandler.java:74) at com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler.retrieve(BambooRemoteArtifactHandler.java:53) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager$3.call(AbstractArtifactManager.java:341) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager$3.call(AbstractArtifactManager.java:335) at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:86) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager.retrieveArtifact(AbstractArtifactManager.java:334) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager.retrieve(AbstractArtifactManager.java:294) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.prepareArtifacts(PrepareBuildTask.java:150) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:98) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:183) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:111) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:110) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:662) Caused by: java.io.IOException: Unexpected HTTP status code: 401 Unauthorized at com.atlassian.bamboo.v2.build.agent.remote.sender.HttpMessageSender.send(HttpMessageSender.java:105) ... 17 more 2014-05-28 05:02:09,635 WARN [2-BAM::agent-18-11.buildeng.atlassian.com (2)::Agent:pool-6-thread-1] [PrepareBuildTask] Failure in artifact preparation phase during processing of: Subscription for Shared artifact: [hallelujah-dist], pattern: [jira-*-dist.zip] anchored at: [jira-distribution/jira-func-tests-runner/target], destination: [] {noformat} build log: {noformat} 28-May-2014 05:02:09 Build JIRA JDK8 Plans - CI Functional Tests - Java 8 - Func 07 #131 (JJDK8-FUNCJ8-F07-131) started building on agent agent-18-11.buildeng.atlassian.com (2) 28-May-2014 05:02:09 Build working directory is /opt/bamboo-agent/xml-data/build-dir/JJDK8-FUNCJ8-F07 28-May-2014 05:02:09 Executing build JIRA JDK8 Plans - CI Functional Tests - Java 8 - Func 07 #131 (JJDK8-FUNCJ8-F07-131) 28-May-2014 05:02:09 Preparing artifact for use: hallelujah-dist 28-May-2014 05:02:09 Failure in artifact preparation phase during processing of: Subscription for Shared artifact: [hallelujah-dist], pattern: [jira-*-dist.zip] anchored at: [jira-distribution/jira-func-tests-runner/target], destination: [] 28-May-2014 05:02:09 1 error(s) found when performing pre-build actions. 28-May-2014 05:02:32 Running on server: post build plugin 'Clover Delta Calculator' 28-May-2014 05:02:33 Running on server: post build plugin 'Build Hanging Detection Configuration' 28-May-2014 05:02:33 Running on server: post build plugin 'NCover Results Collector' 28-May-2014 05:02:33 Running on server: post build plugin 'Maven Dependencies Postprocessor' 28-May-2014 05:02:33 All post build plugins have finished 28-May-2014 05:02:33 Generating build results summary... 28-May-2014 05:02:33 Saving build results to disk... 28-May-2014 05:02:33 Indexing build results... 28-May-2014 05:02:33 Finished building JJDK8-FUNCJ8-F07-131. {noformat} server log {noformat} 2014-05-28 04:59:26,409 ERROR [http-bio-8085-exec-190] [DeliverMessageServlet] Cannot process message: invalid authentication token for JJDK8-FUNCJ8-131 2014-05-28 04:59:26,426 ERROR [http-bio-8085-exec-126] [DeliverMessageServlet] Cannot process message: invalid authentication token for JJDK8-FUNCJ8-131 {noformat}

    Atlassian JIRA | 3 years ago | Martin Meinhold
    java.lang.RuntimeException: java.io.IOException: Unexpected HTTP status code: 401 Unauthorized
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The agent was preparing the build and tried to download a shared artefact: {noformat} 16-Apr-2014 04:29:03 Build A1. JIRA Master Tier 1 - CI Functional Tests - Func 06 #6713 (MASTERONE-CIFUNCHAL-FUNC06-6713) started building on agent Elastic Agent on i-83d0c1d2 16-Apr-2014 04:29:03 Build working directory is /opt/bamboo-agent/bamboo-agent-home/xml-data/build-dir/MASTERONE-CIFUNCHAL-FUNC06 16-Apr-2014 04:29:03 Executing build A1. JIRA Master Tier 1 - CI Functional Tests - Func 06 #6713 (MASTERONE-CIFUNCHAL-FUNC06-6713) 16-Apr-2014 04:29:03 Preparing artifact for use: hallelujah-dist 16-Apr-2014 04:29:29 Failure in artifact preparation phase during processing of: Subscription for Shared artifact: [hallelujah-dist], pattern: [jira-*-dist.zip] anchored at: [jira-distribution/jira-func-tests-runner/target], destination: [] 16-Apr-2014 04:29:29 1 error(s) found when performing pre-build actions. {noformat} Looking at the agent's log, it failed to communicate with the server: {noformat} 2014-04-16 04:29:03,888 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [DefaultBuildAgent] Running build phase: com.atlassian.bamboo.v2.build.task.InitializeBuild 2014-04-16 04:29:03,889 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [RemoteExecutionPhaseServiceImpl] A1. JIRA Master Tier 1 - CI Functional Tests - Func 06 #6713 (MASTERONE-CIFUNCHAL-FUNC06-6713) VCS sync started 2014-04-16 04:29:03,987 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [CheckoutDirectoriesSnapshotHelper] Build working directory is /opt/bamboo-agent/bamboo-agent-home/xml-data/build-dir/MASTERONE-CIFUNCHAL-FUNC06 2014-04-16 04:29:03,988 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [DefaultBuildAgent] Running build phase: com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask 2014-04-16 04:29:03,989 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [PrepareBuildTask] Executing build A1. JIRA Master Tier 1 - CI Functional Tests - Func 06 #6713 (MASTERONE-CIFUNCHAL-FUNC06-6713) 2014-04-16 04:29:03,990 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [PrepareBuildTask] Preparing artifact for use: hallelujah-dist 2014-04-16 04:29:29,976 ERROR [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [HttpMessageSender] Failed to send message. java.io.IOException: Unexpected HTTP status code: 502 Bad Gateway at com.atlassian.bamboo.v2.build.agent.remote.sender.HttpMessageSender.send(HttpMessageSender.java:105) at com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler.internalRetrieve(BambooRemoteArtifactHandler.java:74) at com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler.retrieve(BambooRemoteArtifactHandler.java:53) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager$3.call(AbstractArtifactManager.java:341) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager$3.call(AbstractArtifactManager.java:335) at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:86) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager.retrieveArtifact(AbstractArtifactManager.java:334) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager.retrieve(AbstractArtifactManager.java:294) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.prepareArtifacts(PrepareBuildTask.java:150) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:98) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:181) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:101) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:108) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:662) 2014-04-16 04:29:29,977 ERROR [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [BambooPluginUtils] Unable to retrieve artifact hallelujah-dist for MASTERONE-CIFUNCHAL-FUNC06-6713 via com.atlassian.bamboo.build.artifact.BambooRem oteArtifactHandler@56dbd887 java.lang.RuntimeException: java.io.IOException: Unexpected HTTP status code: 502 Bad Gateway at com.atlassian.bamboo.v2.build.agent.remote.sender.HttpMessageSender.send(HttpMessageSender.java:111) at com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler.internalRetrieve(BambooRemoteArtifactHandler.java:74) at com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler.retrieve(BambooRemoteArtifactHandler.java:53) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager$3.call(AbstractArtifactManager.java:341) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager$3.call(AbstractArtifactManager.java:335) at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:86) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager.retrieveArtifact(AbstractArtifactManager.java:334) at com.atlassian.bamboo.build.artifact.AbstractArtifactManager.retrieve(AbstractArtifactManager.java:294) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.prepareArtifacts(PrepareBuildTask.java:150) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:98) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:181) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:101) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:108) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:662) Caused by: java.io.IOException: Unexpected HTTP status code: 502 Bad Gateway at com.atlassian.bamboo.v2.build.agent.remote.sender.HttpMessageSender.send(HttpMessageSender.java:105) ... 17 more 2014-04-16 04:29:29,978 WARN [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [PrepareBuildTask] Failure in artifact preparation phase during processing of: Subscription for Shared artifact: [hallelujah-dist], pattern: [jira-*-dist.zip] anchored at: [jira-distribution/jira-func-tests-runner/target], destination: [] 2014-04-16 04:29:29,978 WARN [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [PrepareBuildTask] 1 error(s) found when performing pre-build actions. {noformat} However, immediately after that, it was able to talk to the server again: {noformat} 2014-04-16 04:29:29,992 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [RemoteExecutionPhaseServiceImpl] A1. JIRA Master Tier 1 - CI Functional Tests - Func 06 #6713 (MASTERONE-CIFUNCHAL-FUNC06-6713) execution finished 2014-04-16 04:29:30,004 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [DefaultBuildAgent] Detected '1' errors in build. Aborting build process. 2014-04-16 04:29:30,004 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [RemoteResultProcessor] Build A1. JIRA Master Tier 1 - CI Functional Tests - Func 06 #6713 (MASTERONE-CIFUNCHAL-FUNC06-6713) completed on Bamboo agent. Sending results to server. 2014-04-16 04:29:30,101 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [DefaultBuildAgent] Setting context to null on Elastic Agent on i-83d0c1d2/138832944 2014-04-16 04:29:30,101 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [BuildAgentControllerImpl] Agent 'Elastic Agent on i-83d0c1d2' ready to take build from queue... 2014-04-16 04:29:30,211 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [BuildAgentControllerImpl] A1. JIRA Master Tier 1 - CI Functional Tests - Func 14 #6713 (MASTERONE-CIFUNCHAL-FUNC14-6713) taken from queue. 2014-04-16 04:29:30,212 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [RemoteExecutionPhaseServiceImpl] A1. JIRA Master Tier 1 - CI Functional Tests - Func 14 #6713 (MASTERONE-CIFUNCHAL-FUNC14-6713) assigned to agent 615844060 2014-04-16 04:29:30,225 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [DefaultBuildAgent] Setting new context on Elastic Agent on i-83d0c1d2/138832944 2014-04-16 04:29:30,272 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [BuildAgentControllerImpl] Build A1. JIRA Master Tier 1 - CI Functional Tests - Func 14 #6713 (MASTERONE-CIFUNCHAL-FUNC14-6713) started building on agent Elastic Agent on i-83d0c1d2 2014-04-16 04:29:30,272 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [DefaultBuildAgent] Running build phase: com.atlassian.bamboo.v2.build.task.InitializeBuild 2014-04-16 04:29:30,273 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [RemoteExecutionPhaseServiceImpl] A1. JIRA Master Tier 1 - CI Functional Tests - Func 14 #6713 (MASTERONE-CIFUNCHAL-FUNC14-6713) VCS sync started 2014-04-16 04:29:30,342 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [CheckoutDirectoriesSnapshotHelper] Build working directory is /opt/bamboo-agent/bamboo-agent-home/xml-data/build-dir/MASTERONE-CIFUNCHAL-FUNC14 2014-04-16 04:29:30,342 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [DefaultBuildAgent] Running build phase: com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask 2014-04-16 04:29:30,343 INFO [1-BAM::Elastic Agent on i-83d0c1d2::Agent:pool-4-thread-1] [PrepareBuildTask] Executing build A1. JIRA Master Tier 1 - CI Functional Tests - Func 14 #6713 (MASTERONE-CIFUNCHAL-FUNC14-6713) {noformat} The following logs in the server log look relavent: {noformat} 2014-04-16 04:29:29,969 INFO [bambooAgentMessageListenerConnector-1] [DefaultErrorHandler] Recording an error: Failure in artifact preparation phase during processing of: Subscription for Shared artifact: [hallelujah-dist], pattern: [jira- 2014-04-16 04:29:29,982 WARN [bambooAgentMessageListenerConnector-1] [CurrentlyBuildingImpl] Timer being stopped, but timer isn't started 2014-04-16 04:29:30,203 INFO [bambooAgentMessageListenerConnector-1] [CurrentlyBuildingContainer] startBuildingOnAgent called for [MASTERONE-CIFUNCHAL-FUNC14-6713], agent 615844060 2014-04-16 04:29:30,203 INFO [bambooAgentMessageListenerConnector-1] [CurrentlyBuildingContainer] Agent 615844060 finished building MASTERONE-CIFUNCHAL-FUNC06-6713, but the build is still processed by the server. Detaching it from the agent {noformat} It doesn't happen very often, but grepping the logs for _Failure in artifact preparation phase during processing_ revealed at least five cases. Impact: the build goes red, a new build has to be kicked off. Workaround: none (beside restarting the build which is still a manual thing) (server: Atlassian Bamboo version 5.5-m1 build 4300)

    Atlassian JIRA | 3 years ago | Martin Meinhold
    java.lang.RuntimeException: java.io.IOException: Unexpected HTTP status code: 502 Bad Gateway
  6. 0

    Cannot copy large Artifacts [502 Bad Gateway] - Atlassian Documentation

    atlassian.com | 5 months ago
    java.lang.RuntimeException: java.io.IOException: Unexpected HTTP status code: HTTP/1.1 502 Bad Gateway

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      Unexpected HTTP status code: HTTP/1.1 401 Unauthorized

      at com.atlassian.bamboo.v2.build.agent.remote.sender.HttpMessageSender.send()
    2. com.atlassian.bamboo
      ImpersonationHelper$1.run
      1. com.atlassian.bamboo.v2.build.agent.remote.sender.HttpMessageSender.send(HttpMessageSender.java:129)
      2. com.atlassian.bamboo.v2.build.agent.remote.RemoteArtifactManager.markSubscriptionAsConsumed(RemoteArtifactManager.java:28)
      3. com.atlassian.bamboo.build.artifact.AbstractArtifactManager.retrieve(AbstractArtifactManager.java:320)
      4. com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.prepareArtifacts(PrepareBuildTask.java:156)
      5. com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:100)
      6. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:188)
      7. com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:112)
      8. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:110)
      9. com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
      10. com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
      11. com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
      12. com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
      12 frames
    3. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame