我只是使用 EB 和 python 3.4 和 Django 启动了一些环境,但它一直失败,看起来错误发生在使用 pip install -r requirements.txt 安装时,这是来自网络的事件控制台:
Time Type Details
2017-10-06 20:22:39 UTC-0600 WARN Environment health has transitioned from Pending to Degraded. Command failed on all instances. Initialization completed 69 seconds ago and took 14 minutes.
2017-10-06 20:22:20 UTC-0600 ERROR Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.
2017-10-06 20:21:17 UTC-0600 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2017-10-06 20:21:17 UTC-0600 ERROR [Instance: i-0b46caf0e3099458c] Command failed on instance. Return code: 1 Output: (TRUNCATED)...) File "/usr/lib64/python2.7/subprocess.py", line 541, in check_call raise CalledProcessError(retcode, cmd) CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2017-10-06 20:21:14 UTC-0600 ERROR Your requirements.txt is invalid. Snapshot your logs for details.
我遵循了本教程:django-elastic-beanstalk-django和 deploying-a-django-app-and-postgresql-to-aws-elastic-beanstalk两者都停留在同一步骤
请您参考如下方法:
我遇到了完全相同的问题。这是我找到的解决方案:
- 转到您环境的配置
- 点击Instances的conf按钮
- 在Server 部分下,检查您的Custom AMI ID
现在,离开页面并转到 AWS EC2 Console page
