3

I tried to connect to my EC2 Ubuntu LTS instance but I failed. The error message I got like below: ssh: connect to host ec2-79-125-83-13.eu-west-1.compute.amazonaws.com port 22: Connection refused

I checked the instance log, the last lines like below:

The disk drive for /dev/xvdf is not ready yet or not present. 
Continue to wait, or Press S to skip mounting or M for manual recovery 

What could be the problem here?

Could you help me please?

zontragon
  • 275
  • 1
  • 4
  • 14
  • Your instance isn't booting up because it's failing to mount that device. This is probably a mismatch between what the image expects and the actual EC2 instance configuration. Which AMI are you using? – mgorven Feb 19 '13 at 19:51
  • ubuntu/images/ebs/ubuntu-precise-12.04-amd64-server-20130124 – zontragon Feb 19 '13 at 19:57
  • That doesn't really help. What's the AMI ID, and where did you get it from? – mgorven Feb 19 '13 at 19:59
  • Ubuntu Server 12.04.1 LTS. It's EC2's standart AMI. – zontragon Feb 19 '13 at 20:04
  • To identify the origin of the problem : In _console.aws_ with a right click on the instance > _"Instance Settings"_ > _"Get System log"_ – svassr Dec 12 '14 at 00:20

2 Answers2

8

Probably an /etc/fstab issue. Ubuntu is trying to mount a partition present in /etc/fstab and yet not able to find that partition i.e. /dev/xvdf.

In order to troubleshoot this, you need to -

1) shutdown this instance

2) Launch another instance

3) Attach the root EBS of this instance to the new instance from step(2)

4) mount the EBS from step(3) , say in /mnt/ebs

5) Check fstab for any inconsistency , /mnt/ebs/etc/fstab. If there is any inconsistency, backup that file, modify it, unmount the partition, and re-attach it to the instance in step(1) and launch it.

Daniel t.
  • 9,291
  • 1
  • 33
  • 36
  • 2
    Thanks. I did exactly as you said. For me it was to add ```nofail , nobootwait``` arguments at the failling line in ```/etc/fstab```. – svassr Dec 12 '14 at 00:15
  • 1
    That page was also a great help in the process: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html (particularly the command ```lsblk``` to check volume are attached and mounted correctly) – svassr Dec 12 '14 at 00:16
-2

Things to check:

  1. Verify your Security Group rules allow SSH access from your source IP address.

  2. Verify if IPtables is running and blocking connections. You can either service iptables stop or add a rule to your input chain to allow access

If the above doesn't help, run ssh@yourhost -v to gather more details and paste it here so we can see where the disconnect is happening. Connection refused is generally a firewalls access control issue. Hope this helps

RomeNYRR
  • 1,441
  • 11
  • 16