Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EFS Mount Targets not created when ebextension runs... #21

Open
ricardo-mela opened this issue Jul 5, 2018 · 9 comments
Open

EFS Mount Targets not created when ebextension runs... #21

ricardo-mela opened this issue Jul 5, 2018 · 9 comments

Comments

@ricardo-mela
Copy link

Hi,

I have noticed that it may happen that your environment is running the ebextensions when the mount targets are not yet created. As such, the update operation fails since the mount-efs.sh script exits due to the mount points not being ready.

I added a sleep 120 in the script to take me out of the immediate issue and it solves it, but it would be good to have some kind of retry logic for that command.

@pajtai
Copy link

pajtai commented Aug 2, 2019

I'm running into the same issue, I see:

mount.nfs4: Failed to resolve server fs-....efs.....amazonaws.com: Name or service not known
ERROR: Mount command failed!.

@ricardo-mela where in the script did you add this? Can you provide a snippet of the code where you added it? Thanks!

@ricardo-mela
Copy link
Author

Line 60 of https://github.com/aws-samples/eb-php-wordpress/blob/master/.ebextensions/efs-mount.config is a good place to do so.

Otherwise, you can run a loop with an aws efs describe-mount-targets --file-system-id ${EFS_FILE_SYSTEM_ID} command and continue when the command returns exit code 0. Try not use exponential backoff or similar, as in any AWS API call.

As mentioned on my previous comment,

@atan-planview
Copy link

I cannot get pass this error at all, please help
[Instance: i-0a16d932b349fa6f6,i-0bb65df3635f61985] Command failed on instance. Return code: 1 Output: (TRUNCATED)...vers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 fs-567aded7.efs.us-east-1.amazonaws.com:/ /wpfiles mount.nfs4: Failed to resolve server fs-567aded7.efs.us-east-1.amazonaws.com: No address associated with hostname ERROR: Mount command failed!. command 01_mount in .ebextensions/efs-mount.config failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.

@dherrerab
Copy link

I have exactly the same problem here.
Using a sleep command, as ricardo-mela suggested, did not work for me.

Finally, to get wordpress running, I've had to disable the EFS creation.

A good solution without disabling the EFS creation would be appreciated.

@ITmaze
Copy link

ITmaze commented May 18, 2020 via email

@dherrerab
Copy link

Finally I've found the problem, but not the solution (well, perhaps a possible solution is not using Amazon Linux 2). It is described here:

https://forums.aws.amazon.com/thread.jspa?threadID=320355

@dherrerab
Copy link

Yes, I can definitely confirm that using Amazon Linux 1 instead of 2 everything works correctly.

@lchigami
Copy link

I have exactly the same problem here.
Using a sleep command, as ricardo-mela suggested, did not work for me.

Finally, to get wordpress running, I've had to disable the EFS creation.

A good solution without disabling the EFS creation would be appreciated.

Hi @dherrerab
How to disable the EFS creation?

@dherrerab
Copy link

I have exactly the same problem here.
Using a sleep command, as ricardo-mela suggested, did not work for me.
Finally, to get wordpress running, I've had to disable the EFS creation.
A good solution without disabling the EFS creation would be appreciated.

Hi @dherrerab
How to disable the EFS creation?

Well, it's been a long time since this, I can hardly remember, but I suppose that just not including the files efs-create.config and efs-mount.config in the folder .ebextensions should do the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants