【问题标题】:Unable to access EFS from ECS Fargate task无法从 ECS Fargate 任务访问 EFS
【发布时间】:2022-11-14 07:46:55
【问题描述】:

尝试启动使用 EFS 卷的 Fargate 任务。

从 ECS 控制台启动任务时,我收到此错误:

ResourceInitializationError: failed to invoke EFS utils commands to set up EFS volumes: stderr: Failed to resolve "fs-019a4b2d1774c5586.efs.eu-west-1.amazonaws.com" - check that your file system ID is correct, and ensure that the VPC has an EFS mount target for this file system ID. See https://docs.aws.amazon.com/console/efs/mount-dns-name for more detail. Attempting to lookup mount target ip address using botocore. Failed to import necessary dependency botocore, please install botocore first. : unsuccessful EFS utils command execution; code: 1

文件系统 ID 正确。我已经从同一个 VPC 中的 ec2 实例安装了卷,一切都很好。

此处定义的以下步骤:https://aws.amazon.com/premiumsupport/knowledge-center/ecs-fargate-mount-efs-containers-tasks/?nc1=h_ls

我不知道在哪里为 ECS 服务或任务指定出站规则。 See image

提前致谢。

【问题讨论】:

  • “我不知道在哪里为 ECS 服务或任务指定出站规则”。转到分配给服务的安全组,然后查看出站部分。尽管对我来说,“无法解决”错误听起来更像是您的 VPC 中的 DNS 问题。
  • 谢谢@MarkB,我已经编辑了分配给 ECS 的安全组,并在端口 2049 上添加了 NFS 的出站规则。它现在可以工作了。

标签: amazon-ecs aws-fargate amazon-efs


【解决方案1】:

正如@MarkB 所说,我已经编辑了出站规则并将端口 2049 (NFS) 添加到 EFS 安全组,它工作正常。

【讨论】:

  • 我正在尝试修复类似的错误。您将 2049 添加到该规则的“目标”中是什么?
【解决方案2】:
  1. 基本上ECS的安全组应该允许在2049端口的入口和nfs协议中的ssh到挂载目标的安全组和
  2. 挂载目标的安全组应该允许 2049 端口上的 nfs 协议。

【讨论】:

    猜你喜欢
    • 2022-12-20
    • 1970-01-01
    • 1970-01-01
    • 2021-10-30
    • 2021-02-02
    • 1970-01-01
    • 2020-04-25
    • 2021-06-27
    • 2020-01-05
    相关资源
    最近更新 更多