My previously working ec2 instance is suddenly not accessible through SSH or HTTP. This is what I have tried so far:

  1. Rebooting Instance
  2. Shutting down and starting up
  3. My instance system logs are empty
  4. Created new instance, detached volume and attached volume to new instance. I did not delete previous volume (Kinda scared of deleting anything, am new to aws)

My instance configuration is Amazon linux x86. Its failing Instance Status Checks. Any direction, help will be very appreciated.

  • What are you trying to preserve from the instance? Perhaps you could try to create an AMI from the instance and see if that fails too. – Jedi Jun 7 '16 at 3:28
  • @Jedi yes I tried it and it failed. – Sourabh Jun 7 '16 at 6:04

The easiest way to deal with rogue instances is to

  1. Stop them
  2. Create a new instance in the same region and same zone (i.e., us-east-1b), t2.micro is fine for this
  3. Detach the volume from the rogue instance (helps to name it)
  4. Attach that volume to the new instance (just like plugging in a new disk drive)
  5. Log into your new instance
  6. Mount the volume and investigate what happened— chances are good a startup file's misconfigured.
  7. After fixing the volume, unmount it, and then you can force-detach it.
  8. Reattach your volume to the previous instance (this time specify the device to serve as the root volume, usually /dev/sda1).
  9. Boot the rogue instance— if you can.

Rinse, and repeat until you've solved the problem. Destroy the other instance when you're done or suffer the bill to leave it running.

  • After attaching my old volume, I am even unable to log into my new instance. – Sourabh Jun 7 '16 at 0:53
  • You've been of great help. Just one more thing, can you elaborate step 6 of your answer. I really have no idea how can I find the error cause. – Sourabh Jun 7 '16 at 1:49
  • Were you able to mount the old volume? These instructions may help. – Jedi Jun 7 '16 at 3:26
  • @Jedi Yes I was able to mount the old volume. I was unable to figure out a reason for failure though so I just copied my files from old instance to new instance. It worked for an hour or so and now its failing again. – Sourabh Jun 7 '16 at 6:03
  • After you copied the files over, did you run something? – Jedi Jun 7 '16 at 6:21

Create a spot instance, see if you can connect using ssh or http from the spot instance. If you can then it's a network issue causing your problems. If not then you can try Ryder's instructions above.

Also try connecting to the new spot instance from your workstation.

It could also be your security group or ACL preventing access. Try opening them up to temporarily.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.