2014-05-21 3 views
7

diesen Fehler:ElasticBeanstalk, Deployment Fehler: Befehlshaken (directoryHooksExecutor.py --path/opt/elasticbeanstalk/hooks/AppDeploy/pre /) failed

Befehlshaken (directoryHooksExecutor.py --path/opt/elasticbeanstalk/hooks/appdeploy/pre /) fehlgeschlagen

nach dem Versuch, über Git aws.push bereitzustellen.

Der Einsatz nicht durchgehen, wird das Ereignis, die ausgelöst werden, sind:

2014-05-20 15:41:46 UTC-0700 ERROR [Instanz: i-808b90df Modul: AWSEBAutoScalingGroup ConfigSet: null] Der Befehl ist in der Instanz fehlgeschlagen. Rückgabecode: 1 Ausgabe: Fehler beim Erstellen: Befehlshaken fehlgeschlagen. 2014.05.20 15.41.43 UTC-0700 ERROR Script /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh mit Return 1

Dies ist das Fehlerprotokoll fehlgeschlagen:

2014- 05-20 22: 41: 43,767 [FEHLER] Befehlshaken (directoryHooksExecutor.py --path /opt/ elasticbeanstalk/hooks/appdeploy/pre /) fehlgeschlagen 2014-05-20 22: 41: 43.768 [DEBUG] Command Hooks Ausgabe : 2014-05-20 22: 41: 43.768 [FEHLER] Fehler beim Erstellen von Hook-PreAppDeploy: Befehl Hooks fehlgeschlagen Traceback (letzte Aufruf zuletzt): Datei "/usr/lib/python2.6/site- Pakete/cfnbootstrap/construction.py ", Zeile 511, in run_config CloudFormationCarpenter (config, self._auth_config) .build (Arbeitsprotokoll) Datei "/usr/lib/python2.6/site-packages/cfnbootstrap/construction.py", Zeile 247, im Build changes ['commands'] = CommandTool(). Apply (self._config.commands) Datei "/usr/lib/python2.6/site-packages/cfnbootstrap/command_tool.py", Zeile 113, in anwenden raise ToolError (u "Befehl% s fehlgeschlagen "% name) ToolError: Befehlshaken fehlgeschlagen 2014-05-20 22: 41: 43,795 [FEHLER] Nicht behandelte Ausnahme während der Erstellung: Befehlshaken fehlgeschlagen Traceback (zuletzt letzter Aufruf): Datei"/opt/aws/bin/cfn-init ", Zeile 122, in worklog.build (detail.metadata, configSets) Datei" /usr/lib/python2.6/site-packages/cfnbootstrap/construction.py ", lin e 117, in Build Auftragnehmer (Metadaten) .build (configSets, self) Datei "/usr/lib/python2.6/site-packages/cfnbootstrap/construction.py", Zeile 502, in Build self.run_config (config, worklog) Datei "/usr/lib/python2.6/site-packages/cfnbootstrap/construction.py", Zeile 511, in run_config CloudFormationCarpenter (config, self._auth_config) .build (Arbeitsprotokoll) Datei "/ usr/lib/python2.6/site-packages/cfnbootstrap/construction.py ", Zeile 247, in Build Änderungen ['Befehle'] = CommandTool(). apply (self._config.commands) Datei"/usr/lib/python2.6/site-packages/cfnbootstrap/command_tool.py ", Zeile 113, in anwenden raise ToolError (u" Befehl% s fehlgeschlagen "% name) ToolError: Befehlshaken fehlgeschlagen 2014-05-20 23: 35: 04.652 [DEBUG] CloudFormation-Client initialisiert mit Endpunkt 2014-05-20 23: 35: 04.653 [DEBUG] Beschreiben der Ressource AWSEBAutoScalingGroup im Stapel arn: aws: cloudformation: us-west-1 : 040951787496: stack/awseb-e-yz93miu6mastapel/1bd7f720-da3f-11e3-a5f1-50fa003f9896

Irgendwelche Ideen?

Danke

Antwort

10

Ich stieß auf ähnliche Problem auf der Bundle_install.sh, benutze $> eb logs und überprüfe deine /var/log/directory-hooks-executor.log, für mich scheitert es bei der Installation von Gem 'Forem'.

+0

Ich habe einen ähnlichen Fehler, habe aber Probleme zu identifizieren, wo der Fehler ist. Es ist das erste Mal, dass ich die Logbücher lese ... Kannst du eine Anleitung geben? http://stackoverflow.com/questions/25967427/error-on-first-git-aws-push-to-elastic-beanstalk – MicFin

1

Ich habe einen ähnlichen Fehler: /opt/elasticbeanstalk/hooks/appdeploy/pre/10_composer_install.sh failed with returncode 255 stellt sich heraus, es war Komponist der Schuldige.

Die Protokolle Funden in /var/log/directory-hooks-executor.log:

2015-01-19 15:13:33,537 [INFO] (29969 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Executing script: /opt/elasticbeanstalk/hooks/appdeploy/ pre/10_composer_install.sh 
+ '[' -f composer.json ']' 
+ echo 'Found composer.json file. Attempting to install vendors.' 
Found composer.json file. Attempting to install vendors. 
+ composer.phar install --no-ansi --no-interaction --no-dev --prefer-dist 
Loading composer repositories with package information 
PHP Fatal error: Uncaught exception 'ErrorException' with message 'proc_open(): fork failed - Cannot allocate memory' in phar:///opt/elasticbeanstalk/support/composer.phar/ vendor/symfony/console/Symfony/Component/Console/Application.php:975 
#1 phar:///opt/elasticbeanstalk/support/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php(975): proc_open('stty -a | grep ...', Array, NULL, NULL,  NULL, Array) 
#2 phar:///opt/elasticbeanstalk/support/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php(853): Symfony\Component\Console\Application-> getSttyColumns() 
#3 phar:///opt/elasticbeanstalk/support/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php(818): Symfony\Component\Console\Application-> getTerminalDimensions() 
#4 phar:///opt/elasticbeanstalk/support/composer.phar/vendor/symfony/console/Symfony/Component/Console/Applicat in phar:///opt/elasticbeanstalk/support/composer.phar/vendor/ symfony/console/Symfony/Component/Console/Application.php on line 975 
Fatal error: Uncaught exception 'ErrorException' with message 'proc_open(): fork failed - Cannot allocate memory' in phar:///opt/elasticbeanstalk/support/composer.phar/vendor/ symfony/console/Symfony/Component/Console/Application.php:975 
#1 phar:///opt/elasticbeanstalk/support/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php(975): proc_open('stty -a | grep ...', Array, NULL, NULL,  NULL, Array) 
#2 phar:///opt/elasticbeanstalk/support/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php(853): Symfony\Component\Console\Application-> getSttyColumns() 
#3 phar:///opt/elasticbeanstalk/support/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php(818): Symfony\Component\Console\Application-> getTerminalDimensions() 
#4 phar:///opt/elasticbeanstalk/support/composer.phar/vendor/symfony/console/Symfony/Component/Console/Applicat in phar:///opt/elasticbeanstalk/support/composer.phar/vendor/ symfony/console/Symfony/Component/Console/Application.php on line 975 
2015-01-19 15:20:06,267 [ERROR] (29969 MainThread) [directoryHooksExecutor.py-33] [root directoryHooksExecutor error] Script /opt/elasticbeanstalk/hooks/appdeploy/ pre/10_composer_install.sh failed with returncode 255 

Nach dieser github issue die Möglichkeiten, dies zu beheben, ist die memory_limit in der php.ini zu erhöhen.

1

Ich habe gerade einen ähnlichen Fehler gelöst. Es scheint, dass Elastic Beanstalk mit einem fehlerhaften Zustand auf einer der Instanzen nicht zurecht kam und einfach nicht zu ihm bereitstellen konnte, was zu einer allgemeinen Instabilität in der EB-Umgebung führte.

Ich löste es, indem ich die Anzahl der Instanzen auf 1 reduzierte und erneut implementierte. Dies behielt nur eine gute Instanz, tötete die problematische und löste das Problem.