ElasticBeanstalk工作程序环境停留在“等待EC2实例启动"中.这可能需要几分钟.然后超时 [英] ElasticBeanstalk worker environment stuck in "Waiting for EC2 instances to launch. This may take a few minutes." and then times out
本文介绍了ElasticBeanstalk工作程序环境停留在“等待EC2实例启动"中.这可能需要几分钟.然后超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在通过Cloud Formation Template定义EB工人环境:
I am defining an EB worker environment via Cloud Formation Template:
EbWorkerApplication:
Type: 'AWS::ElasticBeanstalk::Application'
Properties:
ApplicationName: !Sub "${AWS::StackName}-worker"
Description: !Ref DeploymentDescription
EbWorkerEnvironment:
Type: 'AWS::ElasticBeanstalk::Environment'
DependsOn: EbWorkerApplication
Properties:
Tier:
Name: "Worker"
Type: "SQS/HTTP"
ApplicationName: !Ref EbWorkerApplication
EnvironmentName: !Sub "${EnvName}-worker"
SolutionStackName: !Ref SolutionStackName
OptionSettings:
- Namespace: 'aws:autoscaling:launchconfiguration'
OptionName: SecurityGroups
Value:
Fn::ImportValue:
!Sub "${EnvName}-app-sg"
- Namespace: 'aws:autoscaling:launchconfiguration'
OptionName: IamInstanceProfile
Value: "aws-elasticbeanstalk-ec2-role"
- Namespace: 'aws:elasticbeanstalk:environment'
OptionName: ServiceRole
Value: !Ref EbServiceRole
... plus remaining stuff not relevant ...
我有一个类似的WebServer环境,可以向上旋转.
I have a similar, WebServer environment that spins right up.
尽管上面的工作环境无法建立.这是错误:
The worker environment above though, fails to come up. This is the error:
2:58am Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.
12:57am Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
12:57am [Instance: i-0214d84820a734097] Command failed on instance. Return code: 1 Output: Engine execution has encountered an error..
12:56am Instance deployment failed. For details, see 'eb-engine.log'.
12:55am Waiting for EC2 instances to launch. This may take a few minutes.
是什么原因造成的?
推荐答案
通过在子网定义中设置显式的 MapPublicIpOnLaunch:true
解决了此特定问题(问题中所显示的代码之外)
This particular issue was resolved by setting an explicit MapPublicIpOnLaunch: true
in the Subnet definitions (outside of the code shown in the question).
我现在有一个其他错误.
这篇关于ElasticBeanstalk工作程序环境停留在“等待EC2实例启动"中.这可能需要几分钟.然后超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文