I am trying to launch instances on EC2 with jclouds. My code works well for handful of instances, but when I try to launch ~100 nodes, I am running into issues.
In my aws console, I can see that all instances started (running), but some of them are missing their name (metadata not applied correctly.) This could be like 30% of all instances.
65) AWSResponseException on node us-east-1/i-9c9b4fef:
org.jclouds.aws.AWSResponseException: request POST
https://ec2.us-east-1.amazonaws.com/ HTTP/1.1 failed with code 503, error: AWSError{requestId='a7f3e8b1-018c-45ff-a8ad-9d509e88288b', requestToken='null', code='RequestLimitExceeded', message='Request limit exceeded.', context='{Response=, Errors=}'}
at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:78)
at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:71)
at org.jclouds.http.internal.BaseHttpCommandExecutorService$HttpResponseCallable.shouldContinue(BaseHttpCommandExecutorService.java:197)
at org.jclouds.http.internal.BaseHttpCommandExecutorService$HttpResponseCallable.call(BaseHttpCommandExecutorService.java:167)
at org.jclouds.http.internal.BaseHttpCommandExecutorService$HttpResponseCallable.call(BaseHttpCommandExecutorService.java:135)
And later on, it seems like jclouds cannot apply the metadata for failed instances:
99) IllegalStateException on node us-east-1/i-0aaa7e79:
java.lang.IllegalStateException: api response for node(us-east-1/i-0aaa7e79) was null, so we can't customize
at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.call(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:139)
at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.call(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:60)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
The line in my code (which takes several minutes to return and throws RunNodesException) is this:
computeService.createNodesInGroup
(groupName, numInstances,
computeService.templateBuilder()
.hardwareId(hardwareId)
.imageId(imageId)
.locationId(region)
.options(templateOpts)
.build());
I am using jclouds 1.5.0 - do you think that upgrade might help?
Thank you,
Emanuel Buzek