AWS Elastic Beanstalk,创建环境失败

时间:2016-08-22 12:50:10

标签: ruby-on-rails amazon-web-services github

我第一次使用EB,试图将Github上的Ruby on Rails应用程序上传到AWS。我正在按照分步指南进行操作,但我仍然遇到错误:

$ eb create betz5-env
Creating application version archive "app-7f74-160822_083029".
Uploading betz/app-7f74-160822_083029.zip to S3. This may take a while.
Upload Complete.
Environment details for: betz5-env
Application name: betz
Region: us-east-1
Deployed Version: app-7f74-160822_083029
Environment ID: e-3zyk4pueyq
Platform: 64bit Amazon Linux 2016.03 v2.1.3 running Ruby 2.1 (Puma)
Tier: WebServer-Standard
CNAME: UNKNOWN
Updated: 2016-08-22 12:29:03.932000+00:00
Printing Status:
INFO: createEnvironment is starting.
INFO: Using elasticbeanstalk-us-east-1-167880342437 as Amazon S3 storage bucket for environment data.
INFO: Created security group named: sg-9e6fc9e4
INFO: Created load balancer named: awseb-e-3-AWSEBLoa-6TCKNDPQOZUO
INFO: Environment health has transitioned to Pending. Initialization in progress (running for 32 seconds). There are no instances.
INFO: Created security group named: awseb-e-3zyk4pueyq-stack-AWSEBSecurityGroup-1VXHTSO3R625H
INFO: Created Auto Scaling launch configuration named: awseb-e-3zyk4pueyq-stack-AWSEBAutoScalingLaunchConfiguration-CI7ZCOZGHSI
INFO: Added instance [i-03e33a1f265f89c11] to your environment.
INFO: Created Auto Scaling group named: awseb-e-3zyk4pueyq-stack-AWSEBAutoScalingGroup-1CN3N9XS45D1M
INFO: Waiting for EC2 instances to launch. This may take a few minutes.
INFO: Created Auto Scaling group policy named: arn:aws:autoscaling:us-east-1:167880342437:scalingPolicy:67c04326-a636-4870-ad45-b90a1b436646:autoScalingGroupName/awseb-e-3zyk4pueyq-stack-AWSEBAutoScalingGroup-1CN3N9XS45D1M:policyName/awseb-e-3zyk4pueyq-stack-AWSEBAutoScalingScaleUpPolicy-TKX4L47COQH7
INFO: Created Auto Scaling group policy named: arn:aws:autoscaling:us-east-1:167880342437:scalingPolicy:87478c0b-452a-46ab-a23a-4434d4138a10:autoScalingGroupName/awseb-e-3zyk4pueyq-stack-AWSEBAutoScalingGroup-1CN3N9XS45D1M:policyName/awseb-e-3zyk4pueyq-stack-AWSEBAutoScalingScaleDownPolicy-1UGEJG8FXVJPC
INFO: Created CloudWatch alarm named: awseb-e-3zyk4pueyq-stack-AWSEBCloudwatchAlarmLow-BA27Q69FXPNG
INFO: Created CloudWatch alarm named: awseb-e-3zyk4pueyq-stack-AWSEBCloudwatchAlarmHigh-13NTHLWPMZE13
ERROR: [Instance: i-03e33a1f265f89c11] Command failed on instance. Return code: 1 Output: (TRUNCATED)... denied for user 'root'@'ec2-54-204-93-56.compute-1.amazonaws.com' (using password: YES)
/opt/rubies/ruby-2.1.9/bin/bundle:23:in `load'
/opt/rubies/ruby-2.1.9/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace). 
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/12_db_migration.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
ERROR: Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.
WARN: Environment health has transitioned from Pending to Degraded. Command failed on all instances. Initialization completed 39 seconds ago and took 6 minutes.

ERROR: The operation timed out. The state of the environment is unknown. The timeout can be set using the --timeout option.

我意识到我离开这个非常开放,但我不知道为什么这不起作用或我的下一步应该是解决它。从我能够找到的内容来看,AWS故障排除文档似乎并不重要。谢谢你的帮助。

以下是eb活动日志:https://github.com/newom/betz/issues/1

1 个答案:

答案 0 :(得分:0)

尝试将以下命令添加到* .config文件

option_settings:
  - option_name: RAILS_SKIP_MIGRATIONS
    value: true