python - AWS Elastic Beanstalk 环境在创建时卡住了
问题描述
每当我尝试创建应用程序时,它都会被创建,但是当我尝试创建环境时,它会卡在多个地方。我在下面附上了错误日志文件。我也尝试了多种解决方案。就像我从requirement.txt 中删除了所有命令一样。我还重新创建了一个新应用程序和新环境,但它仍然停留在同一个地方。
我的 requirements.txt 看起来像这样:
Django==2.1.5
django-filter==2.0.0
djangorestframework==3.9.0
Markdown==3.0.1
pytz==2018.7
django-timezone-field==3.0
django-rest-auth==0.9.3
django-allauth==0.39.1
django-cors-headers==2.4.0
psycopg2-binary==2.7.7
psycopg2==2.7.7
django-bootstrap4==0.0.8
django-fontawesome-5==1.0.16
Pillow==6.0.0
boto3==1.10.28
django-storages==1.7.1
django-smtp-ssl
django-ses
stripe==2.36.2
django-background-tasks==1.2.0
zappa==0.48.2
django-s3-storage==0.12.5
celery==4.4.0
pycurl==7.43.0.4
我的 django.config 文件是这样的:
option_settings:
aws:elasticbeanstalk:container:python:
WSGIPath: SB_Main/wsgi.py
NumProcesses: 3
NumThreads: 30
"aws:elasticbeanstalk:container:python:staticfiles":
/static/: "static/"
container_commands:
01_makeMigrations:
command: "source /opt/python/run/venv/bin/activate && python manage.py makemigrations SB_Auth"
leader_only: true
02_makeMigrations:
command: "source /opt/python/run/venv/bin/activate && python manage.py makemigrations SB_API"
leader_only: true
03_migrate:
command: "source /opt/python/run/venv/bin/activate && python manage.py migrate"
leader_only: true
04_collectstatic:
command: "source /opt/python/run/venv/bin/activate && python manage.py collectstatic --noinput"
05_makeMigrations:
command: "source /opt/python/run/venv/bin/activate && python manage.py loaddata dummyData.json"
leader_only: true
06_wsgipass:
command: 'echo "WSGIPassAuthorization On" >> ../wsgi.conf'
它也卡在这里并给出此错误:
解决方案
通过查看日志文件,我发现这是 require.txt pycurl 的问题。它没有正确安装。
推荐阅读
- javascript - 角度延迟加载模块错误 - 'RouterModule.forRoot() 调用了两次'
- apache-kafka - 分区特定的 flink kafka 消费者
- docbook - 如何将文档从版本 4 转换为 5
- android - 改造 POST 方法不适用于 nginx 服务器
- ios - 从 UIImage 获取图像路径
- android - 在 Android 中使用电子邮件链接通过 Firebase 进行身份验证:UNAUTHORIZED_DOMAIN 错误
- javascript - 添加或更新事件后,角度引导日历不会更新视图
- owl - 如果此关系中的对象集唯一地标识 OWL 中的主题,是否是属性反函数?
- java - 为什么 Swagger 1.X 会忽略 @XmlAttribute 字段?
- linkedin - LinkedIn API 根据 Hashtag 搜索公开帖子