Elastic Beanstalk-实例上的命令失败。发生意外错误[ErrorCode:0000000001]

菲利普·阿莱索

第一次尝试将django应用程序部署到弹性beantalk。该应用程序使用Django频道。

这些是我的配置文件:

option_settings:  
  aws:elasticbeanstalk:container:python:     
    WSGIPath: "dashboard/dashboard/wsgi.py"
  aws:elasticbeanstalk:application:environment:
    DJANGO_SETTINGS_MODULE: "dashboard/dashboard/settings.py"
    PYTHONPATH: /opt/python/current/app/dashboard:$PYTHONPATH

  aws:elbv2:listener:80:
    DefaultProcess: http
    ListenerEnabled: 'true'
    Protocol: HTTP
    Rules: ws
  aws:elbv2:listenerrule:ws:
    PathPatterns: /websockets/*
    Process: websocket
    Priority: 1
  aws:elasticbeanstalk:environment:process:http:
    Port: '80'
    Protocol: HTTP
  aws:elasticbeanstalk:environment:process:websocket:
    Port: '5000'
    Protocol: HTTP

container_commands:
  00_pip_upgrade:
    command: "source /opt/python/run/venv/bin/activate && pip install --upgrade pip"
    ignoreErrors: false
  01_migrate:
    command: "django-admin.py migrate"
    leader_only: true
  02_collectstatic:
    command: "django-admin.py collectstatic --noinput"
  03_wsgipass:
    command: 'echo "WSGIPassAuthorization On" >> ../wsgi.conf'

运行时,eb create django-env我得到以下日志:

Creating application version archive "app-200617_112710".
Uploading: [##################################################] 100% Done...
Environment details for: django-env
  Application name: dashboard
  Region: us-west-2
  Deployed Version: app-200617_112710
  Environment ID: e-rdgipdg4z3
  Platform: arn:aws:elasticbeanstalk:us-west-2::platform/Python 3.7 running on 64bit Amazon Linux 2/3.0.2
  Tier: WebServer-Standard-1.0
  CNAME: UNKNOWN
  Updated: 2020-06-17 10:27:48.898000+00:00
Printing Status:
2020-06-17 10:27:47    INFO    createEnvironment is starting.
2020-06-17 10:27:49    INFO    Using elasticbeanstalk-us-west-2-041741961231 as Amazon S3 storage bucket for environment data.
2020-06-17 10:28:10    INFO    Created security group named: sg-0942435ec637ad173
2020-06-17 10:28:25    INFO    Created load balancer named: awseb-e-r-AWSEBLoa-19UYXEUG5IA4F
2020-06-17 10:28:25    INFO    Created security group named: awseb-e-rdgipdg4z3-stack-AWSEBSecurityGroup-17RVV1ZT14855
2020-06-17 10:28:25    INFO    Created Auto Scaling launch configuration named: awseb-e-rdgipdg4z3-stack-AWSEBAutoScalingLaunchConfiguration-H5E4G2YJ3LEC
2020-06-17 10:29:30    INFO    Created Auto Scaling group named: awseb-e-rdgipdg4z3-stack-AWSEBAutoScalingGroup-1I2C273N6RN8S
2020-06-17 10:29:30    INFO    Waiting for EC2 instances to launch. This may take a few minutes.
2020-06-17 10:29:30    INFO    Created Auto Scaling group policy named: arn:aws:autoscaling:us-west-2:041741961231:scalingPolicy:8d4c8dcf-d77d-4d18-92d8-67f8a2c1cd9e:autoScalingGroupName/awseb-e-rdgipdg4z3-stack-AWSEBAutoScalingGroup-1I2C273N6RN8S:policyName/awseb-e-rdgipdg4z3-stack-AWSEBAutoScalingScaleDownPolicy-1JAUAII3SCELN
2020-06-17 10:29:30    INFO    Created Auto Scaling group policy named: arn:aws:autoscaling:us-west-2:041741961231:scalingPolicy:0c3d9c2c-bc65-44ed-8a22-2f9bef538ba7:autoScalingGroupName/awseb-e-rdgipdg4z3-stack-AWSEBAutoScalingGroup-1I2C273N6RN8S:policyName/awseb-e-rdgipdg4z3-stack-AWSEBAutoScalingScaleUpPolicy-XI8Z22SYWQKR
2020-06-17 10:29:30    INFO    Created CloudWatch alarm named: awseb-e-rdgipdg4z3-stack-AWSEBCloudwatchAlarmHigh-572C6W1QYGIC
2020-06-17 10:29:30    INFO    Created CloudWatch alarm named: awseb-e-rdgipdg4z3-stack-AWSEBCloudwatchAlarmLow-1RTNBIHPHISRO
2020-06-17 10:33:05    ERROR   [Instance: i-01576cfe5918af1c3] Command failed on instance. An unexpected error has occurred [ErrorCode: 0000000001].
2020-06-17 10:33:05    INFO    Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2020-06-17 10:34:07    ERROR   Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.

ERROR: ServiceError - Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.

错误非常模糊,我不知道自己在做什么错。

菲利普·阿莱索

既然引起了一定的关注,我建议您在aws控制台上检查您的Elastic Beanstalk日志,因为错误是完全通用的,可能是任何错误。我建议主要检查cmd执行和活动日志。

就我而言,这是因为我在requirements.txt中列出了以下内容,并且它们无法在EC2上安装:

mkl-fft==1.1.0
mkl-random==1.1.0
mkl-service==2.3.0
pypiwin32==223
pywin32==228

从requirements.txt中删除这些内容可解决此问题

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Elastic Beanstalk实例的证书路径

来自分类Dev

AWS并分解Elastic Beanstalk实例

来自分类Dev

Elastic Beanstalk与Docker部署失败

来自分类Dev

Elastic Beanstalk SciPy。*静默失败

来自分类Dev

Elastic Beanstalk - 删除环境失败

来自分类Dev

AWS Elastic Beanstalk错误-乘客

来自分类Dev

在Elastic Beanstalk上使用ElasticSearch

来自分类Dev

在Ubuntu上设置Elastic Beanstalk

来自分类Dev

Elastic Beanstalk上的Docker + Django

来自分类Dev

AWS Elastic Beanstalk容器命令失败

来自分类Dev

在AWS Elastic Beanstalk上安装bcrypt失败

来自分类Dev

Django在Elastic Beanstalk Python 3.7上的容器命令失败

来自分类Dev

将ElastiCache连接到Elastic Beanstalk实例

来自分类Dev

如何使用Elastic Beanstalk设置实例类型?

来自分类Dev

从Elastic Beanstalk连接到RDS实例

来自分类Dev

从VPC中的Elastic Beanstalk实例访问RDS

来自分类Dev

阻止AWS Elastic Beanstalk创建新实例

来自分类Dev

新的Elastic Beanstalk实例不使用.htaccess

来自分类Dev

SSH到ROOT的Elastic Beanstalk实例

来自分类Dev

从Elastic Beanstalk连接到RDS实例

来自分类Dev

Elastic Beanstalk 实例不断删除 Clamscan

来自分类Dev

升级 Ruby on Python Elastic Beanstalk 实例

来自分类Dev

创建Elastic Beanstalk应用程序失败

来自分类Dev

Elastic Beanstalk中的Apache配置语法失败

来自分类Dev

ExpressJS-Elastic Beanstalk 502错误网关

来自分类Dev

AWS Elastic BeanStalk“ eb init”错误

来自分类Dev

Rails 4 Elastic Beanstalk部署错误

来自分类Dev

错误:无法更新AWS Elastic Beanstalk环境

来自分类Dev

在Elastic Beanstalk上更改php.ini