Amazon EFS mount fails with the error 'mount.nfs4: Connection timed out'

Amazon EFS mount fails with the error 'mount.nfs4: Connection timed out'

book

Article ID: KB0072089

calendar_today

Updated On:

Products Versions
TIBCO Enterprise Message Service 8.6.0

Description

- EFS mount fails with the error:

'mount.nfs4: Connection timed out

- Command used to mount an EFS file system:

sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport <DNS name for the EFS File system>:/ <mount-point>

- To get the correct mount command:

• Select the newly created file system.
• Verify the correct VPC and Security Group were used
• Click on the Attach tab, and review the Amazon EC2 mount instructions and the EFS ID

 

Issue/Introduction

Amazon EFS mount fails with the error 'mount.nfs4: Connection timed out'

Environment

Linux

Resolution

Resolution:

This error can occur because either the Amazon EC2 instance or the mount target security groups are not configured properly. Make sure that the mount target security group has an inbound rule that allows NFS access from the EC2 security group.

Steps to create security groups:

1. Create a security group for your EC2 instance. For Example, SecurityGroup1

- Add Inbound rules to this security group to allow SSH access on port 22. You can also restrict the source address.

User-added image

2. Create a security group for your EFS mount and in this add the inbound rule for NFS. Set the source for this rule to the EC2 instance security group(SecurityGroup1) created above

User-added image

3. Go to the EC2 console, and add the EC2 Security group "SecurityGroup1" to your EC2 instance.

4. Go to the EFS Console, select your EFS, go to Network and click on "Manage" and then Add the EFS Mount security group(SecurityGroup2) created above.

5. The mount command will work now.