前提・実現したいこと
Djangoアプリをaws:Elasticbeanstalkでデプロイしたいです。
そのeb deployするときにエラーが出てそれを無事に実行させたいです。
発生している問題・エラーメッセージ
エラーメッセージ $ eb deploy Creating application version archive "app-211103_003841". Uploading: [##################################################] 100% Done... 2021-11-02 15:38:56 INFO Environment update is starting. 2021-11-02 15:39:52 INFO Deploying new version to instance(s). 2021-11-02 15:39:56 INFO Instance deployment successfully generated a 'Procfile'. 2021-11-02 15:39:58 ERROR Instance deployment failed. For details, see 'eb-engine.log'. 2021-11-02 15:39:59 ERROR [Instance: i-04bdf2ce2b289c0d1] Command failed on instance. Return code: 1 Output: Engine execution has encountered an error.. 2021-11-02 15:39:59 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1]. 2021-11-02 15:39:59 ERROR Unsuccessful command execution on instance id(s) 'i-04bdf2ce2b289c0d1'. Aborting the operation. 2021-11-02 15:39:59 ERROR Failed to deploy application. eb logsの中にあるeb-engine.logのエラーメッセージ [ERROR] An error occurred during execution of command [app-deploy] - [PostBuildEbExtension]. Stop running the command. Error: container commands build failed. Please refer to /var/log/cfn-init.log for more details. 2021/11/02 15:39:58.867040 [INFO] Executing cleanup logic 2021/11/02 15:39:58.867145 [INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment successfully generated a 'Procfile'.","timestamp":1635867596,"severity":"INFO"},{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1635867598,"severity":"ERROR"}]}]}
試したこと
.ebextensions/db-migrate.configが間違っているという記事を見つけたので修正しましたが同じエラーです。
https://stackoverflow.com/questions/63569357/how-do-i-troubleshoot-container-commands-build-failed-generic-error-in-aws-ela
補足情報(FW/ツールのバージョンなど)
.ebextensions/db-migrate.configの中身です。
container_commands: 01_migrate: command: "source /var/app/venv/*/bin/activate && python3 manage.py migrate" leader_only: true option_settings: aws:elasticbeanstalk:application:environment: DJANGO_SETTINGS_MODULE: portfolio.settings
初学者なのでどの情報が必要かわからないので他にも情報が必要であれば教えてください。
解決していただけると非常に幸いです。
よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー