Troubleshooting Remote Agents

お困りですか?

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

コミュニティに質問

This article requires fixes

This article has been Flagged for fixing. Use caution when using it and fix it if you have Publisher rights.

プラットフォームについて: Server と Data Center のみ - この記事は、サーバーおよびデータセンター プラットフォームのアトラシアン製品にのみ適用されます。

要約

Technical Overview of Remote Agent Connectivity Mechanism

The communication between the remote agent and server is done through two protocols, HTTP and JMS on top of separate unicast TCP connections.

The communication between the remote agent and server is bi-directional, and the remote agent initiates both TCP connections.

The HTTP protocol is used for the initial registration to the server and bootstrapping on the HTTP(s) connector of the server. Artifacts are also transferred using this protocol over the main connector of the server.

The JMS protocol is used for other communications (such as job dispatching, heartbeat messages) together with the Apache ActiveMQ (AMQ) message broker.

HTTP Connection

The agent will usually connect to the server using the same Bamboo URL used for general user access. The URL is set during the agent installation and can be changed later as described here.

Examples of addressesポートコンテキストパスプロトコル

http://my.bamboo:8085/agentServer/

8085

<empty>

http

https://my.bamboo.com/bamboo/agentServer/

443

bamboo

HTTPS

http://192.168.10.10/bamboo/agentServer/

80

bamboo

http

JMS Connection

This connection will be established to the address configured in Bamboo broker at <Bamboo_Home>/bamboo.cfg.xml file. There are two properties defined here:

プロパティ説明
bamboo.jms.broker.client.uriThe broker client URI is the address that is distributed to agents and the endpoint they will attempt to connect to. 
bamboo.jms.broker.uri

The broker URI is the local listener address that Bamboo will attempt to bind the JMS listener to.

  • 0.0.0.0:54663 means it will listen on all interfaces, on port 54663
tip/resting Created with Sketch.
  • Any changes to these properties will require a Bamboo restart.
  • The address should NOT be set to localhost. Ideally, the agent should reach the server directly to it's IP or hostname. If a reverse proxy address is set here, please make sure the proxy is correctly configured to redirect the broker TCP traffic.
Examples of addressesポートプロトコル

tcp://bamboo.hostname:54663

54663

TCP (JMS)

ssl://192.168.10.10:54667

54667

TCP (JMS - secure)

nio://bamboo.hostname:54663

54663

TCP (JMS - buffered TCP)

診断

The commands below can be used for primary connectivity checks and should succeed if the correct addresses and ports are used.

Agent-side checksコマンドRelated articles
    • Is the agent able to reach and resolve the server hostname?
ping <Server_Hostname>ping my.bamboo.url
    • Is the HTTP server port reachable?
telnet <Server_Hostname> <HTTP_Port>telnet my.bamboo.url 8085
    • Is the agent able to reach and resolve the Broker address?
ping <Server_Hostname or IP_address>

ping 192.168.10.10
ping bamboo.hostname


    • Is the server Broker port reachable?
telnet <Server_Hostname or IP_address> <JMS_Port>

telnet 192.168.10.10 54663
telnet bamboo.hostname 54663


Server-side checks コマンド
    • Is the server able to resolve its hostname?
ping <Server_Hostname or IP_address>ping bamboo.hostname
    • Is the HTTP server port referred by the agent bound?

Windows: netstat -an | findstr <HTTP_Port>
Unix Like: netstat -an | grep <HTTP_Port>

netstat -an | findstr 8085
netstat -an | grep 8085

    • Is the server Broker port bound?
Windows: netstat -an | findstr <Broker_Port>
Unix Like: netstat -an | grep <Broker_Port>
netstat -an | findstr 54663
netstat -an | grep 54663
Agent remains in loading: "java.net.BindException: Address already in use"

Increase debug Logging

In case extra logging is needed:

ソリューション

Bamboo with a reverse proxy

If Bamboo is running behind a reverse proxy and the remote agent is getting trouble to connect with Bamboo (in the first stages of connection - using HTTP protocol) or experiencing artifact transfer problems, it might be worth to bypass the proxy to check if it could be causing the issue. The following document can be used for this purpose:

Other common causes for connectivity issues

Some common reasons for port and socket connectivity issues include:

  • Firewalls
  • Antivirus
  • Forward proxies

Please check the above to see if any are interfering or blocking required ports and connections.

説明

The communication between the remote agent and server is done through two protocols, HTTP and JMS on top of separate unicast TCP connections. The communication between the remote agent and server is bi-directional, and the remote agent initiates both TCP connections. The commands listed can be used for primary connectivity checks and should succeed if the correct addresses and ports are used.

最終更新日 2021 年 7 月 26 日

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

はい
いいえ
この記事についてのフィードバックを送信する

このセクションの項目

Powered by Confluence and Scroll Viewport.