Connection to https://bamboo-agent-release-ap-se2.s3.amazonaws.com
Asked by Jonathan Eagle:

I have successfully had Bamboo running in the AWS region US East, but I'd now like to shift it to Sydney.

So far, I have copied the AMI to Sydney, prepared the AMI for saving (ran `c:\opt\bamboo-elastic-agent\bin\prepareInstanceForSaving.bat` ) and added it to the Bamboo instance configuration.

When the instance launches, the instance is successfully started, but the agent initialisation hangs.

I found the following error stack trace in the Bamboo logs:

2014-02-12 13:17:27,002 INFO \[main\] \[S3Sync\] Syncing from: bamboo-agent-release-ap-se2/5.4-OD-5/af9d2dfc15e50edb04d4761ede96390ca55e6767/ to /opt/bamboo-elastic-agent

2014-02-12 13:19:50,461 INFO \[main\] \[S3Utils\] Syncing s3://bamboo-agent-release-ap-se2/5.4-OD-5/af9d2dfc15e50edb04d4761ede96390ca55e6767/ to \\opt\\bamboo-elastic-agent

2014-02-12 13:19:50,462 INFO \[main\] \[S3Utils\] Fetching the list of remote objects...

2014-02-12 13:20:12,719 INFO \[main\] \[AmazonHttpClient\] Unable to execute HTTP request: Connection to <https://bamboo-agent-release-ap-se2.s3.amazonaws.com>refused

org.apache.http.conn.HttpHostConnectException: Connection to <https://bamboo-agent-release-ap-se2.s3.amazonaws.com>refused

at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:158)

at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)

at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)

at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)

at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)

at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)

at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)

at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)

at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:306)

at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:190)

at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:2974)

at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:2945)

at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:478)

at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:462)

at com.atlassian.aws.s3.S3Utils.getObjectNamesAndHashes(S3Utils.java:331)

at com.atlassian.aws.s3.S3Utils.sync(S3Utils.java:159)

at com.atlassian.bamboo.agent.elastic.S3Sync.sync(S3Sync.java:72)

at com.atlassian.bamboo.agent.elastic.installer.ElasticAgentInstaller.main(ElasticAgentInstaller.java:66)

Caused by: java.net.ConnectException: Connection timed out: connect

at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)

at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)

at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)

at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)

at java.net.AbstractPlainSocketImpl.connect(Unknown Source)

at java.net.PlainSocketImpl.connect(Unknown Source)

at java.net.SocksSocketImpl.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)

at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:375)

at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)

... 17 more

How can I check why the connection is getting refused?

Thanks,

Jonathan


Answers:
author: Jonathan Eagle
body: Oh ok.

I can browse to google on the Bamboo instance. Is there a particular configuration needed to allow the instance to browse to the S3 bucket?

comments: author: Przemek Bruski
body: No. With Windows, I think the problem may be that the agent is trying to use the network before the EIP is available. We have a bug filed for that somewhere.


author: Jonathan Eagle
body: I have noticed that the instance doesn't spin up with an EIP already attached. Is there any configuration changes I can make to force the EIP to be automatically assigned?

Thanks.


author: Przemek Bruski
body: You need to enable EIP management in Elastic Bamboo Configuration


author: Jonathan Eagle
body: Thanks!  

It looks like that worked.


author: Jonathan Eagle
body: Oh ok.

I can browse to google on the Bamboo instance. Is there a particular configuration needed to allow the instance to browse to the S3 bucket?


author: Przemek Bruski
body: Your outgoing connections are blocked. You probably need to add an Internet Gateway to your VPC.

comments: author: Jonathan Eagle
body: Oh ok.

I can browse to google on the Bamboo instance. Is there a particular configuration needed to allow the instance to browse to the S3 bucket?


author: Jonathan Eagle
body: Yes I am. Bamboo runs it's own security group, doesn't it?


author: Przemek Bruski
body: Are you using a VPC?


Tags: cloud