Friday, 22 March 2019

How to resolved the issue if EC2 server down, unable to reboot or stop by Raj Gupta




Our instance(i-064d92f1272347f72 ) is unresponsive and when we tried stopping the instance it was stuck in stopping state.



This is because of the underlying host of Instance i-064d92f1272347f72 started to have some issues. Due to the issues with the underlying host, the stop command that was issued did not work and the instance was stuck in stopping state. There are many causes for a system level status check failure like Loss of network connectivity, Loss of system power, Software issues on the physical host and Hardware issues on the physical host that impact network reachability.

We can used any of the below three action to resolved this issue:-

1. We can try to "Force Stop" the instance by choosing the "Stop" button twice in the EC2 Console




2. You can also use the AWS CLI to stop the instance: aws ec2 stop-instances --instance-ids i-064d92f1272347f72  --force


[root@ip-172-31-86-225 ~]# aws ec2 stop-instances --instance-ids i-064d92f1272347f72  --force

The force stop that was issued was successful in stopping the instance and the stop/start that was performed moved the Instance to a new underlying host. 
Terminated instances cannot be recovered. A recovered instance is identical to the original instance, including the instance ID, private IP addresses, Elastic IP addresses, and all instance metadata

3. We can create an Amazon CloudWatch alarm that monitors an Amazon EC2 instance(i-064d92f1272347f72 )  and automatically recovers the instance if it becomes impaired due to an underlying hardware failure or a problem that requires AWS involvement to repair. This recovery action which will automatically stop and start your instances when an issue is detected with the underlying host 

a) Select the EC2 server then click on ADD/Edit alarms


b) Then click on create Alarm 


c) Then fill the and click on create


1 comment: