Error on first git aws.push to elastic beanstalk

I'm new to Elastic Beanstalk and trying to run the Rails 4 application. I followed the explorer here http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html , but when I go to do

git aws.push 

This tells me that my update had errors.

 [Instance: i-a6482b8b Module: AWSEBAutoScalingGroup ConfigSet: null] Command failed on instance. Return code: 1 Output: Error occurred during build: Command hooks failed . 

The ebs magazine is just a jam filled with many confusing elements that I am not familiar with. It's hard to say what to share, but these two areas stood out.

  • A lot is not here, so this is not a big sign. Also calls a bunch of python files that are confusing because I have to run the 64-bit Amazon Linux 2014.03 v1.0.4 working with Ruby 2.0 (Passenger Standalone).

    09-14-22 05: 31: 28,375 [INFO] Launching configSet Infra-WriteApplication2 2014-09-22 05: 31: 28,376 [INFO] Launching configSet Infra-WriteApplication2 2014-09-22 05: 31: 28 376 [DEBUG] Packages not specified 2014-09-22 05: 31: 28 376 [DEBUG] Groups not specified 2014-09-22 05: 31: 28 377 [DEBUG] The user did not specify 2014-09-22 05: 31: 28 377 [DEBUG ] No sources specified 2014-09-22 05: 31: 28 377 [DEBUG] Writing content in / opt / elasticbeanstalk / bin / download _source_bundle 2014-09-22 05: 31: 28 377 [DEBUG] Extracting content from https: / /s3.amazonaws.com/elasticbeanstalk-env-resources-us-east-1/eb_patching_resources/download_source_bundle.py 2014-09-22 05: 31: 28,624 [DEBUG] Setting mode for / opt / elasticbeanstalk / bin / download _source_bundle for 000750 2014-09-22 05: 31: 28,625 [DEBUG] Owner 0 and group 0 for / opt / elastic beanstalk / bin / download _source_bundle 2014-09-22 05: 31: 28,625 [DEBUG] Running the 01downloadVersion command 2014-09-22 05: 31: 28,626 [DEBUG] No test for the 01downloadVersion command 2014-09-22 05: 31: 29,354 [INFO] 01downloadVersion command successfully completed 2014-09-22 05: 31: 29,355 [DEBUG] 01downloadVersion command output: 2014-09-22 05: 31: 29,355 [DEBUG] Running 02deleteVersionDownloadScriptFile command 2014-09-22 05: 31: 29,356 [DEBUG] No test for the 02deleteVersionDownloadScriptFile command 2014-09-22 05: 31: 29,370 [INFO] The 02deleteVersionDownloadScriptFile command completed successfully 2014-09-22 05: 31: 29,371 The [DEBUG] 02deleteVersionDownloadScriptFile command: 2014-09-22 05: 31: 29 371 [DEBUG] No services specified 2014-09-22 05: 31: 29,384 [INFO] Launch configSet Infra-EmbeddedPreBuild 2014-09-22 05: 31: 29,388 [INFO] Launch configSet Hook- PreAppDeploy 2014-09-22 05: 31: 29,389 [INFO] Starting the Hook-PreAppDeploy configuration 2014-09-22 05: 31: 29 389 [DEBUG] No packages specified 2014-09-22 05: 31: 29 389 [DEBUG] No groups specified 2014-09-22 05: 31: 29 389 [DEBUG] No user specified 2014-09-22 05: 31: 29,390 [DEBUG] No sources specified 2014-09-22 05: 31: 29,390 [DEBUG] Files not specified 2014-09-22 05: 31: 29,390 [DEBUG] Launch of command hooks 2014-09-22 05: 31: 29,390 [DEBUG] No tests for command hooks 2014-09-22 05: 31: 41,367 [ERROR] Intercepts commands (directoryHooksExecutor.py --path / opt / elasticbeanstalk / hooks / appdeploy / pre /) failed 2014-09-22 05: 31: 41,367 [DEBUG] Command output: 2014-09-22 05: 31: 41,368 [ERROR ] Error building Hook-PreAppDeploy: Traceback command interceptors failed ( last call): File "/usr/lib/python2.6/site-packages/cfnbootstrap/construction.py", line 511, in run_config CloudFormationCarpenter (config, self._auth_config) .build (worklog) File "/ usr / lib / python2.6 / site-packages / cfnbootstrap / construction.py ", line 247, in assembly changes ['commands'] = CommandTool (). apply (self._config.commands) File "/usr/lib/python2.6/site-packages/cfnbootstrap/command_tool.py", line 113, apply raise ToolError (u "Command% s failed"% name) ToolError: failed Commands 2014-09-22 05: 31: 41,369 [ERROR] Unhandled exception during assembly: Traceback command hooks failed (last last call): File "/ opt / aws / bin / cfn-init", line 122, in worklog. build (detail.metadata, configSets) File "/usr/lib/python2.6/site-packages/cfnbootstrap/construction.py", line 117, in the assembly Contractor (metadata) .build (configSets, self) File "/ usr /lib/python2.6/site-packages/cfnbootstrap/construction.py ", line 502, in the assembly self.run_config (config, worklog) File" /usr/lib/python2.6/site-packages/cfnbootstrap/construction. py ", line 511, in run_config CloudFormationCarpenter (config, self._auth_config) .build (worklog) File "/usr/lib/python2.6/site-packages/cfnbootstrap/construction.py", line 247, in assembly changes ['commands'] = CommandTool () . apply (self._config.commands) File "/usr/lib/python2.6/site-packages/cfnbootstrap/command_tool.py", line 113, apply raise ToolError (u "Command% s failed"% name)

  • This is another area that looked exceptionally bad. I have git installed and I'm not sure why it asks about the package ...

    • install the package Do not run the Bundler as root. The bundler may ask sudo if necessary, and installing your package as the root will ruin this application for all non-root users on this computer. Getting gem metadata from https://rubygems.org/ ........ You need to install git in order to use stones from git repositories. For help installing git, check out the GitHub tutorial at https://help.github.com/articles/set-up-git

    2014-09-22 05: 31: 41,280 [ERROR] (4868 MainThread) [directoryHooksExecutor.py-33] [root directoryHooksExecutor error] Script / opt / elasticbeanstalk / hooks / appdeploy / pre / 10_bundle_install.sh failed with return code 11

Sorry for the odd code fragments, I just can't win today!

Does anyone have any AWS / Elastic Beanstalk experience that can help me fix this issue?

+3
git amazon-web-services elastic-beanstalk ruby-on-rails-4 deployment
source share
1 answer

Do you have git installed on your ec2 instance?

You can install it using ebextension. Create a file called .ebextensions/01-git.config . The file name must have the extension .config .

The contents of the file may be as follows:

 packages: yum: git: [] 

This file is in YAML format, so it is important to indent. Read more about the ebextensions package section here . Commit this file and run git aws.push again. It will deploy the new version of the application in your environment and install git on your EC2 instances.

Most likely, your Gemfile has sources like git urls. This is why bundler is trying to get with git. You can also consider using gems using an elastic beanstalk. More details here .

Also, with regard to python files, these are python scripts that are run by Elastic Beanstalk to deploy the version of the application in your instances.

+7
source share

All Articles