【发布时间】:2021-05-08 08:27:31
【问题描述】:
我遵循了这个教程:https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html
我能够在本地 MacBook Pro 上运行我的 Django 项目,但是在部署到 AWS EB 时,它失败了,日志如下:
2021/02/03 23:50:45.548154 [INFO] Executing instruction: StageApplication
2021/02/03 23:50:45.807282 [INFO] extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/
2021/02/03 23:50:45.807307 [INFO] Running command /bin/sh -c /usr/bin/unzip -q -o /opt/elasticbeanstalk/deployment/app_source_bundle -d /var/app/staging/
2021/02/03 23:50:46.552599 [INFO] finished extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/ successfully
2021/02/03 23:50:46.553257 [ERROR] An error occurred during execution of command [app-deploy] - [StageApplication]. Stop running the command. Error: chown /var/app/staging/bin/python: no such file or directory
2021/02/03 23:50:46.553265 [INFO] Executing cleanup logic
2021/02/03 23:50:46.553350 [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 failed. For details, see 'eb-engine.log'.","timestamp":1612396246,"severity":"ERROR"}]}]}
我的研究使我找到了这篇文章:AWS Elastic Beanstalk chown PythonPath error,但是当我在我的项目目录中尝试建议的命令:git rm -r --cached venv 时,它返回了:
致命:pathspec 'venv' 不匹配任何文件
【问题讨论】:
标签: python django amazon-web-services amazon-elastic-beanstalk