【问题标题】:AWS Cloud formation cfn-init errorAWS 云形成 cfn-init 错误
【发布时间】:2012-12-16 09:49:42
【问题描述】:

我正在尝试使用 Cloud Formation 脚本创建集群结构。我正在使用 Bitnami drupal AMI。 但脚本产生以下错误:

WaitCondition received failed message: 'Failed to run cfn-init' for uniqueId: i-4d121a16

然后我连接到实例并检查了 cfn-init.log:

bitnami@ip-10-58-51-235:/var/log$ cat cfn-init.log                              
2013-01-01 19:18:23,128 [INFO] Starting new HTTP connection (1): 169.254.169.254
2013-01-01 22:52:17,607 [INFO] Starting new HTTP connection (1): 169.254.169.254
2013-01-01 22:52:17,621 [INFO] Starting new HTTPS connection (1): cloudformation-waitcondition-    eu-west-1.s3.amazonaws.com

我的 AWS 控制台事件如下:

逻辑 ID PhysicalID 状态原因

mycluster arn:aws:cloudformation:eu-west-1:318730... CREATE_FAILED 未能创建以下资源:[WaitCondition]

WaitCondition vgdrobe-WaitCondition-UWEKNUJ8TMT6 CREATE_FAILED WaitCondition 收到失败消息:'无法运行 cfn-init' for uniqueId: i-59272f1c

WaitCondition vgdrb-WaitCondition-MML6Y6E47WTB CREATE_IN_PROGRESS

WebServerGroup vgdrb-WebServerGroup-1OBJYOSQX8093 CREATE_COMPLETE

我找不到问题。你能帮帮我吗?

亲切的问候...

【问题讨论】:

    标签: amazon-web-services amazon-cloudformation


    【解决方案1】:

    cfn-init 脚本是否可能不是图像的一部分?

    根据docs,它们作为 Amazon Linux 映像的一部分安装,但默认情况下可能不包含在其他映像中。

    【讨论】:

      【解决方案2】:

      扩展 Chris 的建议,我必须添加以下内容才能让 cfn-init 处理我的 CloudFormation 脚本:

      "apt-get -y install python-setuptools\n", 
      "easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-1.0.tar.gz\n", 
      

      我在这里找到了一些非常有用的信息:http://smart421.wordpress.com/2012/12/14/aws-cloudformation-and-chef-on-centos/

      我还发现我的 UserData 中的错误导致 cfn-init 失败。我通过在上传之前使用 VS2012 验证脚本来解决这个问题(如此处建议:How can I quickly and effectively debug CloudFormation templates?)。

      希望对您有所帮助。

      【讨论】:

        猜你喜欢
        • 2017-04-04
        • 2019-06-13
        • 1970-01-01
        • 1970-01-01
        • 2017-05-21
        • 1970-01-01
        • 2016-02-14
        • 2020-04-01
        • 1970-01-01
        相关资源
        最近更新 更多