自定义图层中的实例始终处于start_failed状态

时间:2016-05-02 22:10:34

标签: amazon-ec2 aws-opsworks rhel7

没有为实例创建opsworks日志,因此我没有大量的调试信息,但我会尝试尽可能具有描述性。非常感谢任何提示或想法。

我有一堆自定义图层,一些是服务图层,一些是mongodb,另一个是客户memcached图层。

我尝试在RHEL7和Amazon Linux(2016.03)实例(最新版本都使用最新的opsworks代理版本3436)和主厨11.10上的每一层中启动一个实例。

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

当我创建由mongodb层和服务层共享的实例时,实例会进入设置阶段,然后每次进入剩余的进程(除了我自己的一些厨师代码)。

从EC2启动实例并联机并进行所有状态检查。我查看了ec2仪表板中的实例系统日志,并且没有发生任何系统级错误。由于IAM用户从不加载,我无法进入实例进行进一步调查。

所有实例都获得相同的自定义配方,然后执行是否继续执行该实例在运行时确定是否跳过如果层和部署不对齐,所以我不相信这是一个配方差异。

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

是否有其他人遇到过类似的问题,或者甚至只是指出了我正确的方向?

更新

我想出了如何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>'

1 个答案:

答案 0 :(得分:1)

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

可以在Opsworks中打开公共IP地址 - &gt;图层 - &gt;网络部分。

此外,这是AWS NAT Instances Documentation