TeamCity EC2 Integration for Cloud Agents

I'm struggling to get TeamCity (v8.0.4) talking to my Build Agent hosted in AWS. Both the TeamCity server and Build Agent are in EC2, but under different accounts.

I've set up what appears to be correct cloud credentials and the TeamCity server can communicate with the Build Agent by turning it on, spinning up the server and there can be a connection made. My issue is that the Build Agent, once online, has no compatible builds associated to it and therefore won't work!The incompatible builds are telling me, for example, that the MSBuild component is incorrect yet it tells me that DotNetFramework4.0_x64 exists as the unmet requirement?

By 'unmet requirement' am I meant to interperate that as the .Net4 framework does not exist? It's installed on the server and we've previously built on this instance before now.

I've reinstalled .Net4, installed .Net4.5 and also have the Microsoft Windows SDK for Win. 7 and .Net Framework 4 installed on the machine.

Happy to get any information that would be helpful. Looking at log files now...

2 comments
Comment actions Permalink

Here's what I believe to be the relevant log file entries. I've put warnings in BOLD but the rest are only for informative purposes.

[2013-10-29 15:42:34,454]   INFO - cher.DotNetPropertiesExtension - Start Microsoft Windows SDK Search
[2013-10-29 15:42:35,312]   INFO - cher.DotNetPropertiesExtension - Found Windows SDK v7.1
[2013-10-29 15:42:35,312]   INFO - cher.DotNetPropertiesExtension - Found Windows SDK Tools for .NET Framework 4.0
[2013-10-29 15:42:35,312]   INFO - cher.DotNetPropertiesExtension - Found Windows SDK Tools for .NET Framework 4.0 (x64)
[2013-10-29 15:42:35,312]   INFO - cher.DotNetPropertiesExtension - Found Microsoft Windows SDK NetFx 3.5 Tools
[2013-10-29 15:42:35,312]   INFO - cher.DotNetPropertiesExtension - Found Microsoft Windows SDK NetFx 3.5 Tools (x64)
[2013-10-29 15:42:35,312]   INFO - cher.DotNetPropertiesExtension - Found Windows SDK Tools for .NET Framework 4.0
[2013-10-29 15:42:35,312]   INFO - cher.DotNetPropertiesExtension - Found Windows SDK Tools for .NET Framework 4.0 (x64)
[2013-10-29 15:42:35,312]   INFO - cher.DotNetPropertiesExtension - Finished Microsoft Windows SDK Search
[2013-10-29 15:42:35,312]   WARN - agent.FxCopPropertiesExtension - FxCopCmd.exe was not found in VS 2010 installation directory. Checked path: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\..\..\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe
[2013-10-29 15:42:35,312]   INFO -    jetbrains.buildServer.AGENT - Start build agent
[2013-10-29 15:42:35,359]   INFO -    jetbrains.buildServer.AGENT - Agent Web server started
[2013-10-29 15:42:35,687]   INFO - l.directories.DirectoryMapImpl - Cleaning up old checkout directories. Default lifetime = 192 hour(s)
[2013-10-29 15:42:35,781]   INFO - agent.impl.AgentPortFileWriter - Writing agent runtime file to D:\TeamCity\BuildAgent\bin\..\logs\buildAgent.port
[2013-10-29 15:42:35,781]   INFO - agent.impl.AgentPortFileWriter - Launcher version is 27616
[2013-10-29 15:42:35,781]   INFO - agent.impl.AgentPortFileWriter - Writing agent runtime file to D:\TeamCity\BuildAgent\bin\..\logs\buildAgent.port :DONE!
[2013-10-29 15:42:35,812]   INFO -    jetbrains.buildServer.AGENT - Build agent started
[2013-10-29 15:42:35,812]   INFO - ctories.CleanupRegistryCleaner - Removing files from .old to meet free space requirements.
[2013-10-29 15:42:36,483]   INFO - vcs.tfs.SimpleTfsProcessRunner - TFS command finished. command: D:\TeamCity\BuildAgent\plugins\tfs-agent\bin\tfs-native.exe @@D:\TeamCity\BuildAgent\temp\globalTmp\TC-TFS-10-1355_1\command.params, in file: {/CheckApi}, completed in: 0 second(s)
stdout: TFS Native Verifier v8.0 Copyright (C) 2006-2013 JetBrains s.r.o.
Running under .NET Framework 4.0.30319.17929
INFO  -
INFO  - Use Team Explorer 2010
INFO  -
INFO  - Tfs API available.
TfsVersion=10.0
[2013-10-29 15:42:36,529]   INFO - se.agent.ClearCaseAgentSupport - ClearCase agent checkout is disabled: Could not find executable: 'cleartool'. Original message: Cannot run program "cleartool" (in directory "."): CreateProcess error=2, The system cannot find the file specified
[2013-10-29 15:42:36,529]   INFO - buildServer.AGENT.registration - Registering on server https://TEAMCITYSERVER, AgentDetails{Name='uk-test-1', AgentId=null, BuildId=null, AgentOwnAddress='xxx.xxx.xxx.xxx', AlternativeAddresses=[xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx], Port=9090, Version='27616', PluginsVersion='27616-md5-4b9950bca48e0aebba4f9c836fcb5076', AvailableRunners=[Ant, dotnet-tools-dupfinder, dotnet-tools-inspectcode, Duplicator, FxCop, gradle-runner, Inspection, Ipr, jb.nuget.installer, jb.nuget.pack, jb.nuget.publish, jetbrains.dotNetGenericRunner, jetbrains.mspec, jetbrains_powershell, JPS, Maven2, MSBuild, MSTest, NAnt, NUnit, rake-runner, simpleRunner, sln2003, VS.Solution], AvailableVcs=[perforce, mercurial, jetbrains.git, tfs, svn, cvs], AuthorizationToken='authtoken'}
[2013-10-29 15:43:07,875]   WARN - buildServer.AGENT.registration - Call https://TEAMCITYSERVER/RPC2 buildServer.registerAgent3: org.apache.xmlrpc.XmlRpcClientException: Server returned incorrect status code: 502 Bad Gateway
[2013-10-29 15:43:07,875]   WARN - buildServer.AGENT.registration - Connection to TeamCity server is probably lost. Will be trying to restore it. Take a look at logs/teamcity-agent.log for details (unless you're using custom logging).

0
Comment actions Permalink

Adam,

This has nothing to do with .NET.
That's HTTP connection issue from build agent process to TeamCity web server at https://TEAMCITYSERVER/RPC2
I'd check

  • SSL certificates are accepted by the agent process. Check Using HTTPS to access TeamCity serverarticle.
  • There are no reverse proxies on the server side, or request routing is configured correctly.
  • make the same HTTP call to https://TEAMCITYSERVER/RPC2 from the build agent machine with a browser or wget/curl, and ensure it returns a correct (200) response code.
0

Please sign in to leave a comment.