1
votes

I have a TeamCity Server(9.0.3 (build 32334)) on Amazon EC2 Windows Instance.

And i have another EC2 instance(Windows) for my Build Agents. I Installed a Build Agent on this new Instance on Port 9090 and it shows perfectly on the teamCity UI, however when i installed a second Agent on the same machine this time with port 9091, the new agent does not show up on the TeamCity UI(under connected/disconnected/unauthorized).

However both the Agent services are running ( verified it under Windows Services).

I followed this link for installing multiple agents : https://confluence.jetbrains.com/display/TCD9/Setting+up+and+Running+Additional+Build+Agents#SettingupandRunningAdditionalBuildAgents-UsingLaunchDaemonsStartupFilesonMacOSx

And this is what i got from the TeamCity Agent log

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) 
1

1 Answers

1
votes

It turned out to be an Firewall issue, i added a Custom TCP rule for Port 9091 for the Security group on EC2 and now the agent on port 9091 is also connecting. So whenever there is a CannotPingAgentException its most probably due to Firewall or Incorrect Agent properties.