Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-21709

Bamboo Agent will not follow HTTP redirects whilst uploading artifacts back to Bamboo Server.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 9.4.0, 9.3.2
    • 8.0.6, 8.2.1, 8.1.5
    • Agents
    • None

    Description

      Issue Summary

      This is reproducible on Data Center: (yes)

      Bamboo Agent will not correctly follow HTTP 301/302 redirects whilst uploading artifacts back to Bamboo Server.

      Steps to Reproduce

      1. Add an HTTP 301/302 redirect on your Reverse proxy from the original Bamboo URL to a new Bamboo URL (when moving the Bamboo hostname for example)
      2. Restart your Agent. Keep the Remote Agent configuration as is (I.E. using the old Bamboo URL)
      3. Create an artifact definition and run the Plan

      Expected Results

      Artifact definition and upload should succeed

      Actual Results

      The plan fails with:

      13-Apr-2022 13:37:52	Unable to publish artifact [Build log]:
      13-Apr-2022 13:37:52	The artifact is required, build will now fail.
      

      On the Agent I can see:

      2022-04-13 13:36:49,564 WARN [2-BAM::agent7-corretto::Agent:pool-5-thread-1] [AbstractArtifactManager] Publishing [Build log] for ABC-DFG-SBLA-21: no files matching [./build-log.txt] in directory /home/bamboo/bamboo-agent-home-corretto/xm
      l-data/build-dir/ABC-DFG-SBLA
      2022-04-13 13:36:49,565 INFO [2-BAM::agent7-corretto::Agent:pool-5-thread-1] [AbstractArtifactManager] Trying to publish the artifact with handler: com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler
      2022-04-13 13:36:49,569 ERROR [2-BAM::agent7-corretto::Agent:pool-5-thread-1] [BambooArtifactHttpTransport] Unexpected HTTP status code: HTTP/1.1 301 Moved Permanently
      2022-04-13 13:36:49,570 INFO [2-BAM::agent7-corretto::Agent:pool-5-thread-1] [AbstractArtifactManager] Handler com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler did not publish the artifact
      2022-04-13 13:36:49,570 ERROR [2-BAM::agent7-corretto::Agent:pool-5-thread-1] [AbstractArtifactManager] Unable to publish artifact [Build log]: 
      2022-04-13 13:36:49,570 ERROR [2-BAM::agent7-corretto::Agent:pool-5-thread-1] [AbstractArtifactManager] The artifact is required, build will now fail.
      2022-04-13 13:36:49,570 INFO [2-BAM::agent7-corretto::Agent:pool-5-thread-1] [RemoteExecutionPhaseServiceImpl] ABC - DFG - Save build logs as Artifact #21 (ABC-DFG-SBLA-21) execution finished
      

      Workaround

      1. Don't use a redirected Bamboo URL
      2. Update the Agent's <bamboo-agent-home>/conf/wrapper.conf to wrapper.app.parameter.2 to reflect the new Bamboo URL

      Attachments

        Issue Links

          Activity

            People

              73868399605e Eduardo Alvarenga
              73868399605e Eduardo Alvarenga
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: