【发布时间】:2018-03-18 20:56:45
【问题描述】:
我只是使用带有 python 3.4 和 Django 的 EB 启动了一些环境,但它一直失败,看起来使用 pip install -r requirements.txt 安装时发生错误这是来自 Web 控制台的事件:
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 我都卡在同一步骤
【问题讨论】:
-
使用支持 Python 3 的最新 AMI 2017-09
-
如何在 Eb 中使用 AMI?
-
找到您要使用的 AMI ID。然后在 EB 中将默认的 AMI ID 替换为您想要的。
-
有人能写出更完整的说明吗?比如去控制台找到一个我已经拥有的实例然后使用那个 AMI?我可以通过 EC2 控制台找到我的实例的 AMI ID,但它的 ID 中有
python34。我在部署时尝试使用python2.7时遇到了同样的错误...
标签: python django amazon-web-services amazon-elastic-beanstalk