Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EC2 instance terminated before starting up. No console log

Tags:

amazon-ec2

I have created a new AMI based on an existing Fedora Core 13 AMI. When I try to launch an instance with new image, the instance gets terminated even before launching. The status of the instance changes from "pending" to "terminated." I tried to get the system log with Amazon Console, but the log is empty.

How can I find out the cause of instance termination?

Edit: Please check my answer below.

like image 560
Shashikant Kore Avatar asked Nov 14 '22 05:11

Shashikant Kore


1 Answers

The problem occurred due to a bug in AMI bundling utility, which in turn was caused by changes in the output of openssl in newer version. The solution is described in EC2 forum. My keyword searches didn't show up this answer. I stumbled on this answer by searching for only message available for the instance. The message was

Client.InstanceInitiatedShutdown: Instance initiated shutdown

The fix is a simple change in the ruby script for image bundling. The details are at the forum post linked above.

like image 173
Shashikant Kore Avatar answered May 30 '23 23:05

Shashikant Kore