【问题标题】:AWS Elastic Beanstalk, create environment failedAWS Elastic Beanstalk,创建环境失败
【发布时间】:2016-12-29 00:51:33
【问题描述】:

我第一次使用 EB,尝试将 Ruby on Rails 应用程序从 Github 上传到 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

【问题讨论】:

  • 能否在问题中添加/var/log/eb-activity.log 内容
  • 您能检查一下您的database.yml 的设置是否正确吗?
  • 添加了 eb 活动日志。我没有更改 database.yml 设置,我不知道我必须这样做。我目前正在使用 mysql。

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


【解决方案1】:

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

option_settings:
  - option_name: RAILS_SKIP_MIGRATIONS
    value: true

【讨论】:

    猜你喜欢
    • 2019-04-20
    • 2016-04-30
    • 2021-08-15
    • 1970-01-01
    • 2021-09-29
    • 2015-01-22
    • 2018-11-15
    • 1970-01-01
    • 2014-10-27
    相关资源
    最近更新 更多