【问题标题】:Not able to mount EFS with Elastic Beanstalk无法使用 Elastic Beanstalk 挂载 EFS
【发布时间】:2020-11-14 10:39:10
【问题描述】:

我正在尝试使用 EBS 脚本将 EFS 安装到亚马逊 beanstalk。存储-efs-createfilesystem.config 但是该脚本无法找到环境,因此以下 3 行失败并表示没有这样的文件或目录。 代码:

EFS_REGION=$(/opt/elasticbeanstalk/bin/get-config environment | jq -r '.REGION')
EFS_MOUNT_DIR=$(/opt/elasticbeanstalk/bin/get-config environment | jq -r '.MOUNT_DIRECTORY')
EFS_FILE_SYSTEM_ID=$(/opt/elasticbeanstalk/bin/get-config environment | jq -r '.EFS_ID')

错误:

2020-07-22 16:51:24,595 P5115 [INFO] 命令 01_mount 2020-07-22 16:51:24,627 P5115 [INFO] -----------------------命令 输出----------------------- 2020-07-22 16:51:24,628 P5115 [INFO] /tmp/mount-efs.sh:第 3 行:/opt/elasticbeanstalk/bin/get-config:否 这样的文件或目录 2020-07-22 16:51:24,628 P5115 [INFO] /tmp/mount-efs.sh:第 4 行:/opt/elasticbeanstalk/bin/get-config:否 这样的文件或目录 2020-07-22 16:51:24,628 P5115 [INFO] /tmp/mount-efs.sh:第 5 行:/opt/elasticbeanstalk/bin/get-config:否 这样的文件或目录 2020-07-22 16:51:24,628 P5115 [INFO] Mounting ITE EFS 文件系统到目录... 2020-07-22 16:51:24,628 P5115 [INFO] 停止 NFS ID 映射器... 2020-07-22 16:51:24,628 P5115 [INFO] rpc.idmapd 已经停止了!

【问题讨论】:

    标签: amazon-web-services amazon-elastic-beanstalk amazon-ebs


    【解决方案1】:

    发生错误是因为您使用 Amazon Linux 2 (AL2) 作为您的 EB 平台。

    但是,您的脚本尝试使用 仅在 AL1 中有效 /opt/elasticbeanstalk/bin/get-config

    因此,您要么必须修改脚本才能在 AL2 中工作,要么使用基于 AL1 的旧 EB 平台。

    【讨论】:

    • 是的,我修改了脚本。感谢指点
    • @RajeshNarayanan 没问题。如果答案有帮助,我们将不胜感激。
    猜你喜欢
    • 2020-12-22
    • 2021-06-08
    • 2018-03-25
    • 2018-12-08
    • 2019-02-12
    • 2017-07-11
    • 1970-01-01
    • 2016-10-16
    • 2022-01-16
    相关资源
    最近更新 更多