0

I am trying to learn deploying on elastic beanstalk. I am following this particular doc to deploy a wordpress application with load balancers. Application deployment keeps failing with this error

[Instance: i-<instance-id>] Command failed on instance.

Return code: 1 Output: (TRUNCATED)...fs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 <efs-id>.efs.us-east-2.amazonaws.com:/ /wpfiles mount.nfs4:

Failed to resolve server <efs-id>.efs.us-east-2.amazonaws.com: Name or service not known

ERROR: Mount command failed!. command 01_mount in .ebextensions/efs-mount.config failed.

Seem like EFS volume is being created, but not being mounted. What could be the reason for mount failure?

Shabin Muhammed
  • 121
  • 1
  • 7

1 Answers1

0

For me, this was in a custom VPC and I needed to enable DNS Hostname resolution in said VPC. The EC2 instance needs to be able to resolve the EFS endpoint name and without this setting turned on in the VPC, the instance is not able to resolve the name.

The document that I used to troubleshoot the answer was this AWS doc. https://docs.aws.amazon.com/efs/latest/ug/troubleshooting-efs-mounting.html#mount-fails-dns-name

And the setting in the VPC to enable DNS Hostname resoluton, can be done in the console or in the CLI, is documented here.

https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html#vpc-dns-hostnames

  • Could you please summarize the answer here and make it yours? Link-only answers are somewhat frowned upon. Welcome to the site by the way :) – kubanczyk Oct 21 '19 at 07:45