2016-08-22 199 views
0

我第一次使用EB,嘗試從Github上傳Ruby on Rails應用程序到AWS。我下面的一步一步的指導,但我繼續運行到一個錯誤:AWS Elastic Beanstalk,創建環境失敗

$ 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

+0

你能添加/var/log/eb-activity.log內容到問題 – error2007s

+0

你可以檢查你的'''database.yml''進行正確的設置嗎? – Nathan

+0

添加了eb活動日誌。 我沒有更改database.yml設置,我不知道我必須。我目前正在使用MySQL。 – iammurp

回答

0

嘗試添加下面的命令到* config文件

option_settings: 
    - option_name: RAILS_SKIP_MIGRATIONS 
    value: true 
+0

我收到了類似的錯誤消息。 – iammurp

相關問題