TeamCity Build 代理未连接到 TeamCity Server

TeamCity Build agent not connecting to TeamCity Server

我在 Amazon EC2 Windows 实例上有一个 TeamCity Server(9.0.3 (build 32334))。

我还有另一个 EC2 实例 (Windows) 用于我的构建代理。我在端口 9090 上的这个新实例上安装了一个构建代理,它在 teamCity UI 上完美显示,但是当我这次在同一台机器上使用端口 9091 安装第二个代理时,新代理没有显示在TeamCity UI(在 connected/disconnected/unauthorized 之下)。

然而,这两个代理服务都是 运行(在 Windows 服务下进行了验证)。

我按照这个 link 安装了多个代理: https://confluence.jetbrains.com/display/TCD9/Setting+up+and+Running+Additional+Build+Agents#SettingupandRunningAdditionalBuildAgents-UsingLaunchDaemonsStartupFilesonMacOSx

这是我从 TeamCity Agent 日志中得到的

buildServer.AGENT.registration - Call http://1.2.3.4/RPC2 buildServer.registerAgent3: org.apache.xmlrpc.XmlRpcException: jetbrains.buildServer.CannotPingAgentException: Unable to ping agent BuildAgent_QANEW. Check firewall and/or try to specify 'ownAddress' in the agent configuration. Details: Agent 'BuildAgent_QANEW' cannot be accessed by any of the addresses: [1.2.3.4, 2001:0:9d38:90d7:1ca5:281b:f575:9901, 1.2.3.4], (port 9091) 

原来是防火墙问题,我为 EC2 上的安全组添加了端口 9091 的自定义 TCP 规则,现在端口 9091 上的代理也正在连接。因此,每当出现 CannotPingAgentException 时,很可能是由于防火墙或不正确的代理属性。