Hi,

I am using stopInstancesInRegion method of EC2API .

It stops the node without any issue.

The only issue i am worried about is it sends me the response when the node
is still
 in stopping state not stopped state.

By then if i raise a request for startInstancesInRegion method of EC2PI.

I throws me below stack,

instance 'i-011fd9b0646e59df9' is not in a state from which it can be
started

```

 ERROR [deploy-rest-service,194a1a8d137497c6,9ea7d8da6058b460,true] 5074
--- [nio-8090-exec-7] c.m.e.s.impl.ComputeServiceAdaptor : error: request
POST https://ec2.us-east-1.amazonaws.com/ HTTP/1.1 failed with code 400,
error: AWSError{requestId='499752fc-806d-46ed-91e9-47f8ceef2277',
requestToken='null', code='IncorrectInstanceState', message='The instance
'i-011fd9b0646e59df9' is not in a state from which it can be started.',
context='{Response=, Errors=}'}
```

How can i handle such situation in my application where i,

1. raise a request for stopping node and get back success response saying
current state is stopping.
2. raise a request for starting node i get node not in a state from which
it can be started

Please do suggest me if there is any workaround.

Thanks & Regards,
Poornima.BS

Reply via email to