"mount.nfs: Connection timed out" Facing The above Error when trying to Mount an Amazon FSx for NetApp ONTAP on my EC2 linux instance via PuTTY SSH connection from my Local Computer.

0

I am trying to attach an Amazon FSx file system for NetApp ONTAP's volume to an Amazon EC2 Linux instance.

I connected to the EC2 instance using PuTTY on my local computer and followed these steps:

  1. Created a directory for the file system: sudo mkdir /fsx

  2. Attempted to mount the file system: sudo mount -t nfs svm-id.fs-id.fsx.region.amazonaws.com:/vol1 /fsx

However, after one or two minutes of trying, it returns the error: "mount.nfs: Connection timed out."

asked 14 days ago39 views
2 Answers
0

The "mount.nfs: Connection timed out" error you're experiencing when trying to mount your Amazon FSx for NetApp ONTAP file system on your EC2 Linux instance is likely due to a network configuration issue, specifically related to security groups.

To resolve this issue, you should check and adjust the security group settings for both your EC2 instance and the FSx file system:

  1. Ensure that the security group associated with your EC2 instance allows outbound traffic on the NFS port (typically port 2049) to the FSx file system.

  2. Verify that the security group for your FSx file system has an inbound rule that permits NFS traffic (port 2049) from the security group of your EC2 instance.

Additionally, double-check the following:

  1. Confirm that your EC2 instance and the FSx file system are in the same VPC and that the network connectivity between them is properly configured.

  2. Verify that you're using the correct mount target IP address or DNS name for your FSx file system.

  3. Ensure that your EC2 instance has the necessary NFS client utilities installed.

If you continue to experience issues after checking these settings, you might want to try using the FSx mount helper, which can simplify the mounting process and automatically handle some configuration details.

Remember to use the recommended mount options for optimal performance and reliability, such as:

sudo mount -t nfs -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport [file-system-DNS-name]:/[volume-path] [mount-point]

If the problem persists after trying these steps, you may need to review your VPC configuration or contact AWS support for further assistance.
Sources
Troubleshooting mount issues - Amazon Elastic File System
Troubleshooting Amazon FSx for OpenZFS issues - FSx for OpenZFS
Mounting considerations for Linux - Amazon Elastic File System

profile picture
answered 14 days ago
profile picture
EXPERT
reviewed 14 days ago
0

Use mount.nfs4 or mount -t nfs4 to force NFSv4.

Next thing is to look at open ports, do you have both a security group associated with the EC2 that allows outbound on TCP port 2049 to the FSx, and then a corresponding inbound rule on the FSx security group that allows inbound TCP port 2049 from the EC2?

A full list of all ports that may be required is here https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/limit-access-security-groups.html

profile picture
EXPERT
answered 14 days ago
profile picture
EXPERT
reviewed 14 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions