Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why was my ec2-instance terminated by elastic-beanstalk?

I have an EC2-instance inside Elastic Beanstalk environment, which was terminated for reasons unknown. The only information I possess is state transition reason

Client.UserInitiatedShutdown: User initiated shutdown. 

I use this environment alone and I am sure that I haven't initiated shutdown by myself, so this must be EB.

In events there is only one record: instance 'i-6252b1a3' has been removed from your environment. There is no mention of terminating this instance in EB logs too. How can I else get information why this instance was terminated?

like image 538
Anton Khodak Avatar asked Sep 23 '15 07:09

Anton Khodak


1 Answers

It happens when you reached your Elastic Block Store (EBS) volume limit, especially when its the free-tier server. The error can be misleading as it says:

user initiated shutdown

See "What To Do If An Instance Immediately Terminates" for more information about diagnosing instance termination.

AWS CloudTrail helps but if its not set up to monitor the instance shutdown it will not give you any details.

If monitoring has not been set up in your EC2 dashboard, no alarms set up to recover during a monitoring failure then there is no way of recovering a terminated server.

If you have created a snapshot you can restore it or if the server has already been terminated you may create a new instance from the backup.

This way you dont have to change your server app but the mobile and other apps that use the webservice/api.

like image 71
Maddy Anand Avatar answered Sep 25 '22 19:09

Maddy Anand