Amazon ec2 自定义层中的实例始终处于启动失败状态

Amazon ec2 自定义层中的实例始终处于启动失败状态,amazon-ec2,aws-opsworks,rhel7,Amazon Ec2,Aws Opsworks,Rhel7,没有为实例创建opsworks日志,因此我没有大量的调试信息,但我会尽可能地描述。任何提示或想法都将不胜感激 我有很多自定义层,一些是服务层,一些是mongodb,还有一个是customer memcached层 我尝试在每一层中启动一个实例,在RHEL7和Amazon Linux(2016.03)实例(两个最新版本都有最新的opsworks代理版本3436)和chef 11.10上 当mongodb层具有与服务层不重叠的实例时,它们每次都会以start_failed状态失败,在两个操作系统上都

没有为实例创建opsworks日志,因此我没有大量的调试信息,但我会尽可能地描述。任何提示或想法都将不胜感激

我有很多自定义层,一些是服务层,一些是mongodb,还有一个是customer memcached层

我尝试在每一层中启动一个实例,在RHEL7和Amazon Linux(2016.03)实例(两个最新版本都有最新的opsworks代理版本3436)和chef 11.10上

当mongodb层具有与服务层不重叠的实例时,它们每次都会以start_failed状态失败,在两个操作系统上都是100%的失败

当我创建由mongodb层和服务层共享的实例时,该实例将进入设置阶段,然后每次都会完成流程的其余部分(禁止我使用某些chef代码)

从EC2启动实例并联机,所有状态检查都在工作。我已经从ec2仪表板查看了实例系统日志,没有发生任何系统级错误。由于IAM用户从未加载,我无法将ssh连接到实例中进行进一步调查

所有实例都获得相同的自定义配方,然后在运行时确定是否在该实例上继续执行,如果层和部署不一致,则是否跳过,因此我不认为这是配方差异

我最好的猜测是,这可能是一个代理相关的问题,但这只是一种直觉

有没有其他人有过类似的问题,或者甚至可以为我指出正确的方向

更新

我找到了如何使用ssh连接到实例中的方法。它有一个私有ip,但没有一个公共ip,所以我必须从另一个opsworks实例中执行它。无论如何,我在/var/log/aws/opsworks/user-data.log中发现了以下错误:

/tmp/opsworks-agent-installer/opsworks-agent/lib/bootstrap/utils.rb:111:in `block (2 levels) in execute': Failed to execute "yum --assumeyes update" pid 9536 exit 1: Loaded plugins: amazon-id, rhui-lb, search-disabled-repos (RuntimeError)


Could not contact any CDS load balancers: rhui2-cds01.us-east-1.aws.ce.redhat.com, rhui2-cds02.us-east-1.aws.ce.redhat.com.
Could not contact CDS load balancer rhui2-cds01.us-east-1.aws.ce.redhat.com, trying others.
    from /tmp/opsworks-agent-installer/opsworks-agent/lib/bootstrap/utils.rb:99:in `loop'
    from /tmp/opsworks-agent-installer/opsworks-agent/lib/bootstrap/utils.rb:99:in `block in execute'
    from /tmp/opsworks-agent-installer/opsworks-agent/lib/bootstrap/utils.rb:98:in `chdir'
    from /tmp/opsworks-agent-installer/opsworks-agent/lib/bootstrap/utils.rb:98:in `execute'
    from /tmp/opsworks-agent-installer/opsworks-agent/lib/bootstrap/utils.rb:14:in `yum'
    from /tmp/opsworks-agent-installer/opsworks-agent/lib/bootstrap/instance_agent_installer.rb:57:in `install_system_updates'
    from /tmp/opsworks-agent-installer/opsworks-agent/lib/bootstrap/instance_agent_installer.rb:25:in `block in run'
    from /tmp/opsworks-agent-installer/opsworks-agent/lib/bootstrap/log.rb:96:in `measure'
    from /tmp/opsworks-agent-installer/opsworks-agent/lib/bootstrap/instance_agent_installer.rb:25:in `run'
    from /tmp/opsworks-agent-installer/opsworks-agent/lib/bootstrap/instance_agent_installer.rb:10:in `run'
    from /tmp/opsworks-agent-installer/opsworks-agent/bin/opsworks-agent-installer.rb:8:in `<main>'
/tmp/opsworks代理安装程序/opsworks代理/lib/bootstrap/utils.rb:111:在“执行中的块(2级)”中:未能执行“yum--assumeyes更新”pid 9536退出1:加载的插件:amazon id、rhui lb、禁用搜索的repos(运行时错误)
无法联系任何CDS负载平衡器:rhui2-cds01.us-east-1.aws.ce.redhat.com、rhui2-cds02.us-east-1.aws.ce.redhat.com。
无法联系CDS负载平衡器rhui2-cds01.us-east-1.aws.ce.redhat.com,正在尝试其他服务。
来自/tmp/opsworks代理安装程序/opsworks代理/lib/bootstrap/utils.rb:99:in'loop'
来自/tmp/opsworks代理安装程序/opsworks代理/lib/bootstrap/utils.rb:99:in'block in execute'
来自/tmp/opsworks代理安装程序/opsworks代理/lib/bootstrap/utils.rb:98:in`chdir'
从/tmp/opsworks代理安装程序/opsworks代理/lib/bootstrap/utils.rb:98:in'execute'
来自/tmp/opsworks代理安装程序/opsworks代理/lib/bootstrap/utils.rb:14:in'yum'
来自/tmp/opsworks-agent-installer/opsworks-agent/lib/bootstrap/instance\u-agent\u-installer.rb:57:in'install\u-system\u-updates'
来自/tmp/opsworks agent installer/opsworks agent/lib/bootstrap/instance_agent_installer.rb:25:in`block in run'
来自/tmp/opsworks代理安装程序/opsworks代理/lib/bootstrap/log.rb:96:in'measure'
来自/tmp/opsworks-agent-installer/opsworks-agent/lib/bootstrap/instance_-agent_-installer.rb:25:in'run'
来自/tmp/opsworks agent installer/opsworks agent/lib/bootstrap/instance_agent_installer.rb:10:in'run'
来自/tmp/opsworks代理安装程序/opsworks代理/bin/opsworks代理安装程序。rb:8:in`'

已关闭自定义数据库层公共ip地址选项。为了与VPC中的OpsWorks通信,安装cookbooks,然后安装软件包,需要公共ip地址或使用特殊NAT实例

公共IP地址可以在Opsworks->Layers->Network部分打开


此外,这里还有一个.

确保在添加实例时选择要添加的私钥,以便可以使用ec2用户而不是权限下的IAM用户登录。这将有助于进一步调试。我不想要根ssh,但是我可以暂时打开它,以进一步调试问题,并使用aws opsworks代理日志中的错误进行更新