Amazon Cloud Issue :TC Cannot connect to host

Hi All,

I have a question. I have an instance in the EC2 and I am trying to create an agent on it. I have installed an agent already but when i try to create a profile in TeamCity, it creates but after a few minutes says Profile Error
jetbrains.buildServer.clouds.amazon.AmazonCloudException: Amazon EC2 connection (profile 'Amazon Cloud Profile'{id=cp1}): us-east-1.ec2.amazonaws.com Ping failed

Now, I have not even specified that host (us-east-1.ec2.amazonaws.com ) . Actually i have another host that i want it to connect. This is not even a host on the EC2. Is there a field that i am missing. Where do I specify my host to connect to.

One more confusion i have. Is TeamCity going to create an instance of the chosen ami, or use the one that I have already started with installed agent. In case it's going to create the instance of the ami, then will it create the agent as well on it. Is this going to happen every time i start up that agent on the instance.

What if I start the agent on the instance through agent.sh, will it connect to the team city server through the "serverUrl" property in the buildagent.properties?

Thanks in advance.
AR

3 comments

Please check you have set up 'server url' in the server's setting to contain accessible url for the EC2 agent.

You need to prepare build agent EC2 ami that will start build agent. Create build agent, create buildAgent.properties file.
Leave build agent name there blank.

TeamCity server will add Amazon Instance Metadata for the agent with server url and all necessary properties.

Note, build agent should be available from server by http. Make sure build agent ip/port is not firewalled.

0

You need to prepare build agent EC2 ami that will start build agent. Create build agent, create buildAgent.properties file.
Leave build agent name there blank.




How can I setup an ami to start the build agent on creating an instance.

Please check you have set up 'server url' in the server's setting to contain accessible url for the EC2 agent.

by that you mean the teamcity/buildAgent/conf/builagent.properties should contain the server URL. right?.
0

This should be quite easier. What I wrote was quite unclear. Let me explain it in more detail.

1. Ami

What you need is to create an ami. If you start that AMI, the loaded OS should start build agent.
You do not need to put server URL in the build agent properties. All you need is to create buildAgent.properties file.

To make build agent start on the machine load you may install it as windows service (using buildAgent windows installed).
For non-windows OS, please refer to the OS documentation for instructions on how to install a daemon.

2. Server url should be set on the server in administration pages. This url will be sent to build agent as the server url.
http://confluence.jetbrains.net/display/TCD5/Configuring+Server+URL

0

Please sign in to leave a comment.