aws / aws/aws-codedeploy-agent
file already exists deployment failure and duplicate log entries
まだ誰も着手していません。
- 主要言語
- Rust
- スター
- 337
- フォーク
- 196
- 平均マージ
- 10時間 54分
- マージ済み PR(30日)
- 4
説明
We have been successfully deploying our application to numerous Windows 2019 servers for some time now until this past weekend. A round of operating system updates were applied and it appears that SSM upgrade CodeDeploy at the same time. We attempted a deployment immediately after and it failed.
The error happens after the zip file is downloaded and during the extraction process. The error is:
Exception calling "ExtractToDirectory" with "2" argument(s): "The file
'C:\ProgramData\Amazon\CodeDeploy\ce282efb-0b60-4d7f-8e29-233d4ce2710a\d-PMKMQMU3I\deployment-archive\appspec.yml'
already exists."
I've seen numerous articles on rectifying this, but none seem to apply to our situation. What is odd is that every line in the CodeDeploy log file seems to be duplicated after the upgrade, almost as if there are two instances of it running. Here is a sample from the time the service is started:
2022-06-12T06:09:36 INFO [codedeploy-agent(1972)]: CodeDeploy Instance Agent Service: started
2022-06-12T06:09:36 INFO [codedeploy-agent(1972)]: CodeDeploy Instance Agent Service: started
2022-06-12T06:09:36 INFO [codedeploy-agent(1972)]: On Premises config file does not exist or not readable
2022-06-12T06:09:36 INFO [codedeploy-agent(1972)]: On Premises config file does not exist or not readable
2022-06-12T06:09:36 DEBUG [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Configuring deploy control client: Region="us-east-1"
2022-06-12T06:09:36 DEBUG [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Configuring deploy control client: Region="us-east-1"
2022-06-12T06:09:36 DEBUG [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Deploy control endpoint override=
2022-06-12T06:09:36 DEBUG [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Deploy control endpoint override=
2022-06-12T06:09:36 DEBUG [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Enable auth policy = false
2022-06-12T06:09:36 DEBUG [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Enable auth policy = false
2022-06-12T06:09:36 INFO [codedeploy-agent(1972)]: CodeDeploy endpoint: https://codedeploy-commands.us-east-1.amazonaws.com
2022-06-12T06:09:36 INFO [codedeploy-agent(1972)]: CodeDeploy endpoint: https://codedeploy-commands.us-east-1.amazonaws.com
2022-06-12T06:09:36 INFO [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandExecutor: Archives to retain is: 5}
2022-06-12T06:09:36 INFO [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandExecutor: Archives to retain is: 5}
2022-06-12T06:09:36 DEBUG [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Initializing Host Agent: Host Identifier = arn:aws:ec2:us-east-1:zzz:instance/zzz
2022-06-12T06:09:36 DEBUG [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Initializing Host Agent: Host Identifier = arn:aws:ec2:us-east-1:z:instance/zzz
2022-06-12T06:09:36 DEBUG [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Validating CodeDeploy Plugin Configuration
2022-06-12T06:09:36 DEBUG [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Validating CodeDeploy Plugin Configuration
2022-06-12T06:09:36 INFO [codedeploy-agent(1972)]: CodeDeploy endpoint: https://codedeploy-commands.us-east-1.amazonaws.com
2022-06-12T06:09:36 INFO [codedeploy-agent(1972)]: CodeDeploy endpoint: https://codedeploy-commands.us-east-1.amazonaws.com
2022-06-12T06:09:37 INFO [codedeploy-agent(1972)]: CodeDeploy endpoint: https://codedeploy-commands.us-east-1.amazonaws.com
2022-06-12T06:09:37 INFO [codedeploy-agent(1972)]: CodeDeploy endpoint: https://codedeploy-commands.us-east-1.amazonaws.com
2022-06-12T06:09:37 DEBUG [codedeploy-agent(1972)]: Current deploy control endpoint: https://codedeploy-commands.us-east-1.amazonaws.com
2022-06-12T06:09:37 DEBUG [codedeploy-agent(1972)]: Current deploy control endpoint: https://codedeploy-commands.us-east-1.amazonaws.com
2022-06-12T06:09:41 DEBUG [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: CodeDeploy Plugin Configuration is valid
2022-06-12T06:09:41 DEBUG [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: CodeDeploy Plugin Configuration is valid
2022-06-12T06:09:41 DEBUG [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Calling PollHostCommand:
2022-06-12T06:09:41 DEBUG [codedeploy-agent(1972)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Calling PollHostCommand:
2022-06-12T06:09:41 INFO [codedeploy-agent(1972)]: Version file found in C:/ProgramData/Amazon/CodeDeploy/.version with agent version OFFICIAL_1.3.2.1902_msi.
2022-06-12T06:09:41 INFO [codedeploy-agent(1972)]: Version file found in C:/ProgramData/Amazon/CodeDeploy/.version with agent version OFFICIAL_1.3.2.1902_msi.
After the initial error, a rollback is triggered that also fails. The AWS console reports the same error for both the initial deployment and the rollback:
Error Code: Unknown
Message: No such file or directory @ rb_sysopen - C:\ProgramData/Amazon/CodeDeploy/ce282efb-0b60-4d7f-8e29-233d4ce2710a/d-OFHJUGT3I/deployment-archive/web\App_WebReferences\
Once it is all said and done, I checked the deployment folder and the zip file seems to have been extracted cleanly - the appsec file is there and the App_WebReferences.
Any help would be greatly appreciated, and please let me know if there is any other information I can provide to help remedy this.
Thanks
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ソースファイルやテストは指定されていません。CodeDeploy エージェントサービスの起動とデプロイアーカイブの展開パスから始め、重複したログ行を appspec.yml および App_WebReferences のエラーと関連付けてください。再現可能な原因を特定し、デプロイとロールバックが重複処理や展開失敗なしに完了することを確認できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- aws, ruby
- 領域
- cloud, devops
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100