jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shopper Lol <shopper_...@yahoo.com>
Subject AWS ELB Availability Zone
Date Sat, 16 Nov 2013 22:03:31 GMT
 
Hello everyone,


Could someone help me understand how to set Availability Zones for when creating a AWS ELB?
 I have included the error message as well as my code below.

Thanks all!

org.jclouds.aws.AWSResponseException: request POST https://elasticloadbalancing.us-east-1.amazonaws.com/
HTTP/1.1 failed with code 400, error: AWSError{requestI
d='4ad7ab76-4efc-11e3-aeef-b5c1a4edb13c', requestToken='null', code='ValidationError', message='Either
AvailabilityZones or SubnetIds must be specified', contex
t='{Type=Sender, ErrorResponse=}'}
        at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:76)
        at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:67)
        at 

org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:180)
        at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:150)
        at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:95)
        at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:78)
        at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:49)
        at org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
        at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:70)
        at com.sun.proxy.$Proxy66.createListeningInAvailabilityZones(Unknown Source)
        at org.jclouds.elb.loadbalancer.strategy.ELBLoadBalanceNodesStrategy.createLoadBalancerInLocation(ELBLoadBalanceNodesStrategy.java:83)
        at org.jclouds.loadbalancer.internal.BaseLoadBalancerService.createLoadBalancerInLocation(BaseLoadBalancerService.java:116)


======

Properties overrides = new Properties();
context = ContextBuilder.newBuilder("aws-elb").credentials(accessKeyId, 
secretKey).
    overrides(overrides).
    modules(ImmutableSet.<Module>of(new Log4JLoggingModule(),
                                    new SshjSshClientModule())).
    buildView(LoadBalancerServiceContext.class);
 
Set<? extends NodeMetadata> nodes = new 
HashSet<NodeMetadata>();
 
 
context.getLoadBalancerService().createLoadBalancerInLocation(null,
                                                             

loadBalancer.getLoadBalancerId(),
                                                             

loadBalancer.getProtocol(),
                                                             

Integer.parseInt(loadBalancer.getPort()),
                                                             

Integer.parseInt(loadBalancer.getInstancePort()),
                                                             
nodes);
Mime
View raw message