EC2 agent - doesnt work without explicit ownAddress

I've setup an AWS ami which has an agent installed and running at startup
My server can start / stop and see the agent
However, it was reporting that no configurations were valid, as no build runners were found.
After much searching, found that while the agent reported back fine to my build server:

[2013-10-01 16:04:36,747]   INFO - buildServer.AGENT.registration - Registering on server, AgentDetails{Name='', AgentId=null, BuildId=null, AgentOwnAddress='null', AlternativeAddresses=[10.XX.XX.XX, 54.2XX.XXX.XX], Port=9090, Version='24266', PluginsVersion='NA', AvailableRunners=[], AvailableVcs=[], AuthorizationToken=''}

the server then ignores the alternate addresses and instead just uses a local call back (
The only way round this I found was to setup the ownAddress in the build agents properties - but that wont work as it will change on startup

I'm pretty certain that this is because we host TC behind a proxy so we can use IIS to manage all our ssl certs (we're a windows shop, it was just an easier setup) - though it was also the case when behind a ELB with Teamcity server running in AWS where the ELB offloaded our ssl - so its not *just* that we have an odd config (basically taken from there any way round this?
I've got the ec2 address and public ip in a parameter, ec2.public-hostname and ec2.public-ipv4, can I set ownAddress = ec2.public-ipv4 somehow?  tried ownAddress = %ec2.public-ipv4% but that fails
I saw this:
[Workaround] Having troubles getting AMI to connect to serverso guess I could translate to something that will work on windows?  ie have a powershell script that runs on startup, alters the config, then starts the build agent?

We are running TC 7.1, so could upgrae if its a fixed issue, but trying to keep changes to a minimum at the moment!

Please sign in to leave a comment.