Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to connect to my EC2 Ubuntu LTS instance but I failed. The error message I got like below: ssh: connect to host 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?

share|improve this question
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 with a right click on the instance > "Instance Settings" > "Get System log" – svassr Dec 12 '14 at 0:20
up vote 5 down vote accepted

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.

share|improve this answer
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 0:15
That page was also a great help in the process:… (particularly the command lsblk to check volume are attached and mounted correctly) – svassr Dec 12 '14 at 0:16

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

share|improve this answer
EC2's security groups drop packets, not reject so it's not that. There's no console access either so iptables can't be checked. – mgorven Feb 19 '13 at 19:57
If you login into EC2 there is console access from a java session. – RomeNYRR Feb 19 '13 at 19:59
there is a rule which give access to port 22. ssh -v gives same error: Connection refused – zontragon Feb 19 '13 at 20:00
@OvidioBorrero, There is a problem with java. It's not working for a while :( – zontragon Feb 19 '13 at 20:03
@RomeNYRR clearly a wrong answer, you may want to delete it to avoid confussion and recover your karma! – theist Sep 28 '15 at 16:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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