Connection reset by peer : AWS EFS
Matthew Harrington
I am trying to setup EFS and access it using EC2 instances in different availability zones. I have created a separate security group for EFS, which allows traffic for the security group attached to EC2 instances. Installed amazon-efs-utils utility on the EC2 instances also. But when trying to execute the following command: sudo mount -t efs -o tls EFS-ID:/ efs
I am getting the following error:
mount.nfs4: Connection reset by peerI have tried it several times, but it did not work. What am I missing here ? Could anyone please let me know.
Thanks
6 Answers
Does the first answer on here help you?
(which recommends going to the Network Interfaces menu within EC2 and checking that the mount targets for the EFS volume are in the same security group as your EC2 instances).
Cheers, Kingsley.
2Go to your efs security group
In inbound rules add rules and try again
For me, I needed a combination of other answers (Kingsley and Anton - give them some votes if my answer helps).
First, I made sure the EFS volume and the EC2 instance had a shared security group.
Second, I made sure that specific security group allowed both Inbound and Outbound access on the NFS port, using itself as the "target". To make sure that's clear, if my security group is sg-1234, then I edited the inbound rules for sg-1234 - adding an entry for NFS that targeted sg-1234. The same may be necessary with outbound, but my SG already had outbound access wide open.
I may not have needed the shared security group, but could have used the EC2 security group as the target of an inbound NFS rule in the EFS security group.
1for me it was to add 0.0.0.0/0 as the the 'Source' for NFS in the security group:
This was becase DNS hostnames was not enabled on the custom VPC which I had created. It worked after enabling it. Please find more information here:
thx
This is a security groups issue. Makesure every instance in all AZ are in same Security Group.