Elastic BeansTalkで突然デプロイが失敗したときの対処法

Elastic BeansTalkで突然デプロイエラーに遭遇。

ERROR During an aborted deployment, some instances may have deployed the new application version. To ensure all instances are running the same version, re-deploy the appropriate application version.
ERROR Failed to deploy application.
ERROR Unsuccessful command execution on instance id(s) 'i-xxxxxxxxxxxxxxxxx'. Aborting the operation.
INFO Command execution completed on all instances. Summary: [Successful: 0, TimedOut: 1].
WARN The following instances have not responded in the allowed command timeout time (they might still finish eventually on their own): [i-xxxxxxxxxxxxxxxxx].
INFO Environment health has transitioned from Ok to Info. Application update in progress on 1 instance. 0 out of 1 instance completed (running for 16 seconds).
INFO Deploying new version to instance(s).
INFO Environment update is starting.

開発環境では問題なくデプロイできていましたが、ステージング環境でいきなりタイムアウトエラー。

もう一度デプロイを試みてもやはりエラー。

いろいろ調べてみると、どうやら原因はデプロイ先のEC2インスタンスにあるようでした。

原因と対処方法

AWSが言うには「EC2インスタンス内の不具合」とのこと。なので、該当のインスタンスを終了させて、新たなインスタンスを立てます。

再度ElasticBeansTalkでデプロイを実行…

Environment update completed successfully!!!

本番環境で遭遇してたら心臓止まったと思う。。。

参考

https://teratail.com/questions/29149

https://forums.aws.amazon.com/thread.jspa?threadID=206033

Related Posts