Hi All,

I was trying to deploy a sample php application in AWS region
ap-southeast-2. But I got the following error messages.

[2015-07-25 06:57:37,291] ERROR
{org.apache.stratos.cloud.controller.iaases.JcloudsIaas} -  Failed to start
an instance. MemberContext [applicationId=single-cartridge-app-2,
cartridgeType=php, clusterId=single-cartridge-app-2.my-php-2.php.domain,
memberId=single-cartridge-app-2.my-php-2.php.domain6ae6c5d7-3f17-4988-93b7-d0db279f165f,
instanceId=null, partition=Partition [id=partition-1, description=null,
isPublic=false, provider=ec2, properties=Properties [properties=[Property
[name=region, value=ap-southeast-2], Property [name=zone,
value=ap-southeast-2a]]]], defaultPrivateIP=null, defaultPublicIP=null,
allocatedIPs=null, publicIPs=null, privateIPs=null, initTime=1437807456022,
lbClusterId=null, networkPartitionId=network-partition-1,
kubernetesPodId=null, kubernetesPodLabel=null, loadBalancingIPType=Private,
instanceMetadata=null, properties=Properties [properties=[Property
[name=PRIMARY, value=false], Property [name=MIN_COUNT, value=1]]]] Cause: *The
image id '[ami-3d692f07]' does not exist*
org.jclouds.rest.ResourceNotFoundException: The image id '[ami-3d692f07]'
does not exist
at
org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.refineException(ParseAWSErrorFromXmlContent.java:108)
at
org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:89)
at
org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
at
org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:128)
at
org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:98)
at
org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
at
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
at
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
at
org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
at
com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
at com.sun.proxy.$Proxy121.runInstancesInRegion(Unknown Source)
at
org.jclouds.ec2.compute.strategy.EC2CreateNodesInGroupThenAddToSet.createNodesInRegionAndZone(EC2CreateNodesInGroupThenAddToSet.java:240)
at
org.jclouds.aws.ec2.compute.strategy.AWSEC2CreateNodesInGroupThenAddToSet.createNodesInRegionAndZone(AWSEC2CreateNodesInGroupThenAddToSet.java:106)
at
org.jclouds.ec2.compute.strategy.EC2CreateNodesInGroupThenAddToSet.createKeyPairAndSecurityGroupsAsNeededThenRunInstances(EC2CreateNodesInGroupThenAddToSet.java:215)
at
org.jclouds.ec2.compute.strategy.EC2CreateNodesInGroupThenAddToSet.runInstancesAndWarnOnInvisible(EC2CreateNodesInGroupThenAddToSet.java:151)
at
org.jclouds.ec2.compute.strategy.EC2CreateNodesInGroupThenAddToSet.execute(EC2CreateNodesInGroupThenAddToSet.java:132)
at
org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:210)
at
org.jclouds.ec2.compute.EC2ComputeService.createNodesInGroup(EC2ComputeService.java:148)
at
org.apache.stratos.cloud.controller.iaases.JcloudsIaas.startInstance(JcloudsIaas.java:133)
at
org.apache.stratos.cloud.controller.services.impl.InstanceCreator.startInstance(InstanceCreator.java:109)
at
org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:68)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.jclouds.aws.AWSResponseException: request POST
*https://ec2.ap-southeast-1.amazonaws.com/
<https://ec2.ap-southeast-1.amazonaws.com/> HTTP/1.1* failed with code 400,
error: AWSError{requestId='b778e608-d98a-4365-98f9-ec34b9374821',
requestToken='null', code='InvalidAMIID.NotFound', message='The image id
'[ami-3d692f07]' does not exist', context='{Response=, Errors=}'}
at
org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:75)
... 22 more
[2015-07-25 06:57:37,293] ERROR
{org.apache.stratos.cloud.controller.services.impl.InstanceCreator} -
 Could not start instance: [cartridge-type] php [cluster-id]
single-cartridge-app-2.my-php-2.php.domain


I do have that image in ap-southeast-2 region. But it seems JClouds is
trying to spawn an instance in ap-southeast-1 region so trying to find the
image id in that region.

I am not sure why JClouds is trying to use different aws region than the
one mentioned in network-partition used or image id in cartridge
definition. May be it is trying to use the one mentioned in the
cloud-controller.xml. ( [2015-07-25 06:56:30,778]  INFO
{org.apache.stratos.cloud.controller.iaases.ec2.EC2Iaas} -  ZONE has been
set as ap-southeast-1a with id: ap-southeast-1a)

Please find attached cartridge and network partition definitions.

Thanks and Regards,
Swapnil

Attachment: php.json
Description: application/json

Attachment: network-partition-1.json
Description: application/json

Reply via email to