Creating EC2 profile throws error "Initialize Connection failed. Unknown protocol: https"

EC2 profile gives me this error message after creation. What do I need to do to fix it?

* Server is TeamCity 5.1.3 running behind fw but with ports open
* Agents are CentOS based AMIs created with buildagent from the TeamCity server according to this guide: http://confluence.jetbrains.net/display/TCD5/Setting+Up+TeamCity+for+Amazon+EC2

I can succesfully run the amazon buildagent manually but I can not seem to get TeamCity to spawn them as EC2 agents due to this error:

java.lang.IllegalStateException: Unknown protocol: https
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:186)
at java.net.URL.toExternalForm(URL.java:934)
at java.net.URL.toString(URL.java:920)
at com.xerox.amazonws.common.AWSQueryConnection.makeRequest(AWSQueryConnection.java:344)
at com.xerox.amazonws.ec2.Jec2.makeRequestInt(Jec2.java:2004)
at com.xerox.amazonws.ec2.Jec2.describeRegions(Jec2.java:1706)
at jetbrains.buildServer.clouds.amazon.AmazonSyncClientImpl$8.apply(AmazonSyncClientImpl.java:205)

at jetbrains.buildServer.clouds.amazon.AmazonSyncClientImpl.catchEC2Exception(AmazonSyncClientImpl.java:213)
at jetbrains.buildServer.clouds.amazon.AmazonSyncClientImpl.ping(AmazonSyncClientImpl.java:203)
at jetbrains.buildServer.clouds.amazon.AmazonSyncClientImpl.<init>(AmazonSyncClientImpl.java:37)
at jetbrains.buildServer.clouds.amazon.AmazonSyncClientFactoryImpl.createSyncClient(AmazonSyncClientFactoryImpl.java:12)
at jetbrains.buildServer.clouds.amazon.AmazonAsyncClientImpl$2.run(AmazonAsyncClientImpl.java:43)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:432)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:284)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:80)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:183)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:678)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:703)
at java.lang.Thread.run(Thread.java:811)

All help and ideas are welcome!
2 comments

I found that running Felix, which TeamCity use, on a non-sun jre can cause this.

http://felix.apache.org/site/apache-felix-framework-faq.html

I will investigate and post my findings in this thread.

0

Changing JRE to sun jre 1.6 solved this issue, but since we ran into this issue, http://youtrack.jetbrains.net/issue/TW-12136 when registering the amazon build agents, we are doing a TeamCity upgrade aswell to get everything up and running.

0

Please sign in to leave a comment.