Martin Raskovsky
2 min readOct 16, 2017

--

I have followed your instructions, very simple they are, however I hit an error at the stage if “eb create myproduction-env

Here is the log

[mrproduction] $ eb create mrproduction-env
Starting environment deployment via CodeCommit
— — Waiting for Application Versions to be pre-processed — -
Finished processing application version app-1b50–171016_173019
Setting up default branch
Environment details for: mrproduction-env
Application name: mrproduction
Region: eu-west-2
Deployed Version: app-1b50–171016_173019
Environment ID: e-6iw4csmna4
Platform: arn:aws:elasticbeanstalk:eu-west-2::platform/Puma with Ruby 2.4 running on 64bit Amazon Linux/2.5.0
Tier: WebServer-Standard
CNAME: UNKNOWN
Updated: 2017–10–16 16:30:36.176000+00:00
Printing Status:
INFO: createEnvironment is starting.
INFO: Using elasticbeanstalk-eu-west-2–054213193715 as Amazon S3 storage bucket for environment data.
INFO: Environment health has transitioned to Pending. Initialization in progress (running for 4 seconds). There are no instances.
INFO: Created security group named: sg-4593672d
INFO: Created load balancer named: awseb-e-6-AWSEBLoa-1EBQ9LJ7KDYX9
INFO: Created security group named: awseb-e-6iw4csmna4-stack-AWSEBSecurityGroup-CUY1GRP4Q1V6
INFO: Created Auto Scaling launch configuration named: awseb-e-6iw4csmna4-stack-AWSEBAutoScalingLaunchConfiguration-1MZ448YU0FQYL
INFO: Added instance [i-04cfbc47c162bbf17] to your environment.
INFO: Created Auto Scaling group named: awseb-e-6iw4csmna4-stack-AWSEBAutoScalingGroup-74IW40MR068L
INFO: Waiting for EC2 instances to launch. This may take a few minutes.
INFO: Created Auto Scaling group policy named: arn:aws:autoscaling:eu-west-2:054213193715:scalingPolicy:bee5d0c2–7fc4–4107-b447–3c6ac9adfe07:autoScalingGroupName/awseb-e-6iw4csmna4-stack-AWSEBAutoScalingGroup-74IW40MR068L:policyName/awseb-e-6iw4csmna4-stack-AWSEBAutoScalingScaleUpPolicy-6TKGQOKXT92J
INFO: Created Auto Scaling group policy named: arn:aws:autoscaling:eu-west-2:054213193715:scalingPolicy:db220b6c-d0fa-49b5–9f9f-c3587ab5ff5e:autoScalingGroupName/awseb-e-6iw4csmna4-stack-AWSEBAutoScalingGroup-74IW40MR068L:policyName/awseb-e-6iw4csmna4-stack-AWSEBAutoScalingScaleDownPolicy-1JLMG3NRICI5K
INFO: Created CloudWatch alarm named: awseb-e-6iw4csmna4-stack-AWSEBCloudwatchAlarmHigh-DBUTJPHJTSDD
INFO: Created CloudWatch alarm named: awseb-e-6iw4csmna4-stack-AWSEBCloudwatchAlarmLow-188O1E417HDMT
ERROR: [Instance: i-04cfbc47c162bbf17] Command failed on instance. Return code: 1 Output: (TRUNCATED)…b:1:in `<top (required)>’
/var/app/ondeck/config/environment.rb:5:in `<top (required)>’
/opt/rubies/ruby-2.4.1/bin/bundle:23:in `load’
/opt/rubies/ruby-2.4.1/bin/bundle:23:in `<main>’
Tasks: TOP => environment
(See full trace by running task with — trace).
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.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].
WARN: Environment health has transitioned from Pending to Degraded. Command failed on all instances. Initialization completed 30 seconds ago and took 3 minutes.
ERROR: Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.

and later on when deploying again after adding file: .ebextensions/postgres.yml

I got

[mrproduction] $ eb deploy
Starting environment deployment via CodeCommit
— — Waiting for Application Versions to be pre-processed — -
Finished processing application version app-98de-171016_175442
INFO: Environment update is starting.
INFO: Deploying new version to instance(s).
ERROR: [Instance: i-04cfbc47c162bbf17] Command failed on instance. Return code: 1 Output: (TRUNCATED)…ly and accepting
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?
/opt/rubies/ruby-2.4.1/bin/bundle:23:in `load’
/opt/rubies/ruby-2.4.1/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: Unsuccessful command execution on instance id(s) ‘i-04cfbc47c162bbf17’. Aborting the operation.
ERROR: Failed to deploy application.

ERROR: Failed to deploy application.

Any help would be appreciated

--

--