How to bypass the Reverse Proxy used by a Bamboo Server in an Agent connection

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。

このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

This article covers possible solutions to overcome Agent communication problems while transferring Artifacts to and from the Bamboo server.

If you are attempting this in order to fix artifact transfer problems (rejections, timeouts, etc.). Make sure the Proxy server supports HTTP/1.1:  Agent upload of artifacts fails to set Content-Length in HTTP/1.1. Guiding questions:

  • Is HTTP/1.0 compatibility turned on? 
  • Are there any configuration options turned on related to chunked transfer encoding?

環境

  • Bamboo Server or Data Center
  • Remote or Elastic Agent
  • Artifact transfers from and to the Bamboo instance

診断

The Bamboo Server and Remote Agents may report issues while transferring Artifacts when a Load Balancer or Reverse Proxy is configured between both elements. Though Load Balancers are normally welcome on Bamboo setups, there may be cases where they may interfere with proper traffic and end up creating issues such as the reported error below on a Bamboo Agent logs at <Bamboo-Agent-Home>/atlassian-bamboo-agent.log.

INFO   | jvm 1364 | 2024/10/14 10:00:33 | 2024-10-14 10:00:33,728 INFO [0-BAM::RemoteAgent-80139::Agent:pool-4-thread-1] [TaskExecutorImpl] Starting task 'Download release contents' of type 'com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:artifactdownloadertask'
.................................
INFO   | jvm 1364 | 2024/10/14 10:05:39 | java.net.SocketException: Connection reset
INFO   | jvm 1364 | 2024/10/14 10:05:39 | 	at java.net.SocketInputStream.read(SocketInputStream.java:186) ~[?:?]

Bamboo Elastic Agents may encounter issues when the Bamboo URL resolves to an IP address different from the one hosted on the Bamboo Server machine. This occurs because Bamboo establishes a tunnel to the Elastic Agent, which then attempts to connect back to the Bamboo Server using that URL. If the URL resolves to an external IP address, the server may try to connect to that location using external routes, leading to instability or failed connections. This phenomenon is better explained by this KB article:

ソリューション

Remote Agents

  1. Stop Bamboo
  2. Edit the <Bamboo-Install>/conf/server.xml file
  3. Add a new HTTP connector without the attributes (proxyName and proxyPort) pointing to a different port
  4. Start Bamboo
  5. Stop the Remote Agent

  6. Update the <URL:PORT> used by your Agent to match new connector added. On your <Bamboo-Agent-Home>/conf/wrapper.conf, modify the wrapper.app.parameter.2 property to point to the Bamboo proxy-bypass URL and port.

  7. Restart the agent

Elastic Agents

  1. Stop Bamboo
  2. Add the following system property in your Bamboo startup JVM (more details on Configuring your system properties)

    setenv.sh
    -Dbamboo.ec2.agent.endpoint=http://localhost:8085

    (warning) Make sure to replace port 8085 with the Tomcat port configured in your Bamboo instance.
    (warning) You may need to update bamboo.jms.broker.client.uri to match the non-proxied URL.

  3. Start Bamboo
  4. Start a new Elastic Agent






最終更新日: 2024 年 10 月 16 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.