自定义图层中的实例总是获取start_failed状态

问题描述:

没有为实例创建opsworks日志,因此我没有大量调试信息,但我会尽可能描述。任何提示或想法都非常感谢。自定义图层中的实例总是获取start_failed状态

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

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

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

当我创建由mongodb层和服务层共享的实例时,实例会进入设置阶段,然后每次都进入整个过程的其余部分(禁止我的部分主厨代码)。

从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>' 
+0

确保在添加实例时选择要添加的私钥,以便您可以使用ec2用户登录而不是权限下的IAM用户。 –

+0

这将有助于进一步调试。我不想root ssh,但是我可以暂时打开它以进一步调试 –

+0

更新了aws-opsworks代理日志中的bug –

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

公共IP地址可以在Opsworks - >图层 - >网络部分打开。

此外,这里是AWS NAT Instances Documentation