Agents not using buildAgent.properties config params
We recently changed the serverUrl for our teamcity server from teamcity.oldDomain.com to teamcity.newDomain.com. We had a redirect in place for a while, but shut it off now that all our users are used to the new url. However, the agents don't seem to agree. They continue to log this in teamcity-agent.log:
[2018-04-18 17:24:07,060] INFO - .agent.AmazonPropertiesUpdater - TeamCity Build Agent was started by the TeamCity Server in Amazon EC2.
Server URL: http://teamcity.olddomain.com.
Proposed agent name: <will be set on connection to the server>
Cloud profile: profile 'TeamCity AWS Agent Cloud'{id=amazon-1, projectId=_Root}
Idle time to shutdown: 100 minutes
CustomParameters: {
cloud.amazon.agent-name-prefix = EC2
system.cloud.profile_id = amazon-1
teamcity.cloud.agent.remove.policy = unauthorize
teamcity.cloud.instance.hash = 1234569sdjflkdf
}
And then:
[2018-04-18 17:24:09,778] INFO - buildServer.AGENT.registration - Registering on server via URL http://teamcity.oldDomain.com: AgentDetails{Name='EC2-i-1asdfadsfasdf', AgentId=null, BuildId=null, AgentOwnAddress='null', AlternativeAddresses=[(AGENT IP ADDRESS)], Port=9090, Version='51047', PluginsVersion='51047-md5-asdfadfadsfasd', AvailableRunners=[Ant, cargo-deploy-runner, CompressFiles, dotnet-tools-dupfinder, dotnet-tools-inspectcode, dotnet.cli, Duplicator, ftp-deploy-runner, FxCop, gradle-runner, Inspection, jb.nuget.installer, jb.nuget.pack, jb.nuget.publish, jetbrains.dotNetGenericRunner, jetbrains.mspec, jetbrains_powershell, jonnyzzz.grunt, jonnyzzz.gulp, jonnyzzz.node, jonnyzzz.npm, jonnyzzz.nvm, jonnyzzz.phantom, JPS, Maven2, MSBuild, NAnt, NUnit, octopus.create.release, octopus.deploy.release, octopus.promote.release, octopus.push.package, rake-runner, SBT, simpleRunner, sln2003, smb-deploy-runner, sonar-plugin, ssh-deploy-runner, ssh-exec-runner, VisualStudioTest, VS.Solution, xUnitRunner], AvailableVcs=[tfs, cvs, jetbrains.git, mercurial, svn, perforce], AuthorizationToken='asdfasdfdsfa', PingCode='adfafadfadsf'}
The buildAgent.properties file:
serverUrl=teamcity.newDomain.io
name=EC2-i-12314tdsgfdsgdg
workDir=../work
tempDir=../temp
systemDir=../system
ownPort=9090
authorizationToken=asdfj124390udsflkjf
ownAddress=(AGENT IP ADDRESS)
Teamcity Global Settings has the serverUrl overridden with the "newDomain" url as a secondary effort to force the correct behaviour. The cloud config sections have no mention of the old url.
We have tried reinstalling the agent and reconfiguring, still sees the old url. The Teamcity config XML has zero mentions of the old domain.
Kinda at our wits end, anywhere else to look? Our next steps are really to blow away all the agents and agent config and recreate. Which is very unfortunate.
Please sign in to leave a comment.
Well, I'm just going to go jump off a bridge or something. Cannot reproduce. Somehow the agents were able to talk to the old server.
I am so sorry for wasting time and being grumpy. lol. jeepers.
Learned a pile about teamcity, interesting use cases for user-data and tagging, and we got a head start on our Packer AMI build so we can start using spot instances and whatnot.
The lesson for future folks: immutable infrastructure, yo
Good, I was just about to ran out of ideas :)