インスタンスの opsworks ログは作成されないため、大量のデバッグ情報はありませんが、できるだけ詳しく説明するように努めます。ヒントやアイデアは大歓迎です。
私はたくさんのカスタム レイヤーを持っています。いくつかはサービス レイヤーで、いくつかは mongodb で、もう 1 つは顧客の memcached レイヤーです。
RHEL7 と Amazon Linux(2016.03) インスタンス (両方とも最新の opsworks エージェント バージョン 3436 を使用した最新バージョン) とchef 11.10 の両方で、各レイヤーで 1 つのインスタンスを起動しようとしました。
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>'