java.io.IOException: Unexpected HTTP status code: 502 Bad Gateway

Atlassian JIRA | Martin Meinhold | 3 years ago
  1. 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.io.IOException: Unexpected HTTP status code: 502 Bad Gateway
  2. 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.io.IOException: Unexpected HTTP status code: 502 Bad Gateway
  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.io.IOException: Unexpected HTTP status code: 401 Unauthorized
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h4. Replicate issue Create the following Stages: * Default Stage {code:title=Script task under Default Stage / Default Job} echo "# ======================= #" echo "# Sleep (30s)" echo "# ======================= #" sleep 30 echo "# ======================= #" echo "# Create (foo.txt)" echo "# ======================= #" echo "${bamboo.planKey}-${bamboo.buildNumber}" >> foo.txt {code} {noformat} Artifact definition Name: Foo Location: Copy pattern: foo.txt [x] Shared {noformat} * Second Stage {noformat} Artifact download from this plan Artifact Name: Foo {noformat} {code:title=Script task under Second Stage / Second Job} echo "# ======================= #" echo "# Sleep (30s)" echo "# ======================= #" sleep 30 echo "# ======================= #" echo "# Display (foo.txt)" echo "# ======================= #" cat foo.txt echo "# ======================= #" echo "# Create (bar.txt)" echo "# ======================= #" echo "${bamboo.planKey}-${bamboo.buildNumber}" >> bar.txt {code} {noformat} Artifact definition Name: Bar Location: Copy pattern: bar.txt [x] Shared {noformat} * Third Stage {noformat} Artifact download from this plan Artifact Name: All artifacts {noformat} {code:title=Script task under Third Stage / Third Job} echo "# ======================= #" echo "# Display (foo.txt)" echo "# ======================= #" cat foo.txt echo "# ======================= #" echo "# Display (bar.txt)" echo "# ======================= #" cat bar.txt {code} Set up {{Scheduled backup}} to run while Plan above is running using the following configuration: {noformat} [ ] Disable scheduled backups [ ] Backup artifacts [x] Wait for jobs to complete. {noformat} _Please, notice *Wait for jobs to complete* is selected in the Schedule backup above._ h4. Logs {noformat} 2015-06-17 12:50:53,656 INFO [6-DelayedChangeDetectionThread:pool-13-thread-4] [ChainExecutionManagerImpl] Build PROJ-AR-JOB1-4 has been dispatched 2015-06-17 12:50:53,657 INFO [AtlassianEvent::0-BAM::EVENTS:pool-3-thread-7] [BuildQueueManagerImpl] Attempting to queue Project - Artifatcs - Default Job #4 (PROJ-AR-JOB1-4). 2015-06-17 12:50:53,658 INFO [AtlassianEvent::0-BAM::EVENTS:pool-3-thread-7] [ExecutionPhaseServiceImpl] Project - Artifatcs - Default Job #4 (PROJ-AR-JOB1-4) queued 2015-06-17 12:50:53,705 INFO [AtlassianEvent::0-BAM::EVENTS:pool-3-thread-7] [BuildQueueManagerImpl] Sent ExecutableQueueUpdate: addToQueue 2015-06-17 12:50:53,706 INFO [13-BAM::Default Agent::Agent:pool-28-thread-1] [BuildAgentControllerImpl] Agent 131073 checking build queue for executables... 2015-06-17 12:50:53,716 INFO [ActiveMQ Session Task-23] [BuildQueueManagerImpl] Sending PROJ-AR-JOB1-4 to agent 1245185 2015-06-17 12:50:53,749 INFO [bambooAgentMessageListenerConnector-1] [CurrentlyBuildingContainer] startBuildingOnAgent called for [PROJ-AR-JOB1-4], agent 1245185 ... 2015-06-17 12:51:00,010 INFO [scheduler_Worker-1] [ServerLifecycleManagerImpl] Server state changed to 'PAUSING' from 'RUNNING' {noformat} {noformat} INFO | jvm 1 | 2015/06/17 12:51:24 | 2015-06-17 12:51:23,959 INFO [5-BAM::192.168.10.87::Agent:pool-8-thread-1] [AbstractArtifactManager] Publishing [Foo] for PROJ-AR-JOB1-4: 1 file(s) matching [foo.txt] in directory /remote-agent/bamboo-5.9.0/xml-data/build-dir/PROJ-AR-JOB1 INFO | jvm 1 | 2015/06/17 12:51:24 | 2015-06-17 12:51:23,960 INFO [5-BAM::192.168.10.87::Agent:pool-8-thread-1] [AbstractArtifactManager] Trying to publish the artifact with handler: com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler INFO | jvm 1 | 2015/06/17 12:51:24 | 2015-06-17 12:51:24,232 ERROR [5-BAM::192.168.10.87::Agent:pool-8-thread-1] [HttpMessageSender] Failed to send message. INFO | jvm 1 | 2015/06/17 12:51:24 | java.io.IOException: Unexpected HTTP status code: HTTP/1.1 302 Found INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.v2.build.agent.remote.sender.HttpMessageSender.send(HttpMessageSender.java:129) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler.publish(BambooRemoteArtifactHandler.java:43) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.build.artifact.AbstractArtifactManager$1.call(AbstractArtifactManager.java:214) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.build.artifact.AbstractArtifactManager$1.call(AbstractArtifactManager.java:207) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:132) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.build.artifact.AbstractArtifactManager.publishFileSet(AbstractArtifactManager.java:206) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.build.artifact.AbstractArtifactManager.publish(AbstractArtifactManager.java:107) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.build.artifact.BuildArtifactPostProcessor.call(BuildArtifactPostProcessor.java:82) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.performCustomBuildProcess(ExecuteBuildTask.java:159) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:80) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:196) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:122) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:114) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:113) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:118) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) INFO | jvm 1 | 2015/06/17 12:51:24 | at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) INFO | jvm 1 | 2015/06/17 12:51:24 | at java.lang.Thread.run(Thread.java:744) {noformat} {noformat} 2015-06-17 12:51:30,019 INFO [5-Server Lifecycle Manager:pool-12-thread-1] [ServerLifecycleManagerImpl] Server state changed to 'PAUSED' from 'PAUSING' ... 2015-06-17 12:52:00,229 INFO [scheduler_Worker-1] [XmlMigrator] Creating zip:/service/bamboo-5.9.0/backups/bamboo_backup_2015_06_17.zip 2015-06-17 12:52:00,364 INFO [scheduler_Worker-1] [XmlMigrator] Starting export of data... {noformat}

    Atlassian JIRA | 1 year ago | Rafael Sperafico [Atlassian]
    java.io.IOException: Unexpected HTTP status code: HTTP/1.1 302 Found
  6. 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.io.IOException: Unexpected HTTP status code: 401 Unauthorized

    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: 502 Bad Gateway

      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:105)
      2. com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler.internalRetrieve(BambooRemoteArtifactHandler.java:74)
      3. com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler.retrieve(BambooRemoteArtifactHandler.java:53)
      4. com.atlassian.bamboo.build.artifact.AbstractArtifactManager$3.call(AbstractArtifactManager.java:341)
      5. com.atlassian.bamboo.build.artifact.AbstractArtifactManager$3.call(AbstractArtifactManager.java:335)
      6. com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:86)
      7. com.atlassian.bamboo.build.artifact.AbstractArtifactManager.retrieveArtifact(AbstractArtifactManager.java:334)
      8. com.atlassian.bamboo.build.artifact.AbstractArtifactManager.retrieve(AbstractArtifactManager.java:294)
      9. com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.prepareArtifacts(PrepareBuildTask.java:150)
      10. com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:98)
      11. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:181)
      12. com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:101)
      13. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:108)
      14. com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
      15. com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
      16. com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
      17. com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
      17 frames
    3. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:662)
      1 frame