I'm creating a TeamCity server on an ec2 cloud with an elastic IP (meaning even if the instance is terminated and brought back, it keeps the same IP) and I'm trying to use cloud support on it so I can essentially have an entire build farm, master and agents, over ec2. Unfortunately, it seems as though either the ec2 agents cannot be set up for elastic IPs or the vanilla linux ec2 teamcity server cannot be set up for elastic IPs. Let's go over an example of what everything looks like:
TeamCity Server ec2 IP: 220.127.116.11
TeamCity Server ec2 Elastic IP: 18.104.22.168
So, even though I set up the agent's AMI to connect to the server at 22.214.171.124:8111, when I set it up and the initial instance is brought up to show the server what kind of configuration the machine has, I get an error saying the following:
No agents connected after instance start. Please check the image has TeamCity agent configured and it can connect to the server using http://126.96.36.199:8111 address. Start the instance manually to check for agent again.
Why is it asking for the agents to be configured to the IP that changes any time I bring the instance up and down? Shouldn't it be using the elastic IP I set up? I've been pointed toward the server.xml's Connector container and told adding the "address" element may fix this by telling the server to use its elastic IP, but when I try that the server simply doesn't start when I run startup.sh. Is there some kind of Tomcat problem going on here?