2014-05-21 22 views
7

nhận được lỗi này:ElasticBeanstalk, lỗi triển khai: móc Command (directoryHooksExecutor.py --path/opt/elasticbeanstalk/móc/appdeploy/pre /) thất bại

móc Command (directoryHooksExecutor.py --path/opt/elasticbeanstalk/hooks/appdeploy/pre /) không thành công

sau khi cố triển khai thông qua git aws.push.

Việc triển khai không đi qua, sự kiện đó được ném là:

2014-05-20 15:41:46 UTC-0700 ERROR [Instance: i-808b90df Module: AWSEBAutoScalingGroup ConfigSet: null] Lệnh không thành công. Mã trả về: 1 Đầu ra: Lỗi xảy ra trong quá trình xây dựng: Các móc lệnh không thành công. 2014/05/20 15:41:43 UTC-0700 ERROR Script /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh thất bại với mã trả 1

Đây là bản ghi lỗi:

2014- 05-20 22: 41: 43,767 [LRI] Các móc lệnh (thư mụcHooksExecutor.py --path/opt/elasticbeanstalk/hooks/appdeploy/pre /) không thành công 2014-05-20 22: 41: 43,768 [DEBUG] Đầu ra móc lệnh : 2014-05-20 22: 41: 43,768 [ERROR] Lỗi gặp phải trong quá trình xây dựng Hook-PreAppDeploy: Các móc lệnh không thành công Traceback (cuộc gọi gần đây nhất): Tệp "/usr/lib/python2.6/site- packages/cfnbootstrap/construction.py ", dòng 511, trong run_config CloudFormationCarpenter (config, self._auth_config) .build (worklog) Tệp "/usr/lib/python2.6/site-packages/cfnbootstrap/construction.py", dòng 247, trong xây dựng thay đổi ['commands'] = CommandTool(). Áp dụng (self._config.commands) File "/usr/lib/python2.6/site-packages/cfnbootstrap/command_tool.py", dòng 113, khi áp dụng tăng ToolError (u "Command% s thất bại "% name) ToolError: Các móc lệnh không thành công 2014-05-20 22: 41: 43,795 [ERROR] Ngoại lệ chưa xử lý trong khi xây dựng: Các móc lệnh không thành công Traceback (cuộc gọi gần đây nhất): Tệp"/opt/aws/bin/cfn-init ", dòng 122, trong worklog.build (detail.metadata, configSets) Tệp" /usr/lib/python2.6/site-packages/cfnbootstrap/construction.py ", lin e 117, trong xây dựng Nhà thầu (siêu dữ liệu) .build (configSets, self) Tệp "/usr/lib/python2.6/site-packages/cfnbootstrap/construction.py", dòng 502, trong xây dựng self.run_config (config, worklog) Tệp "/usr/lib/python2.6/site-packages/cfnbootstrap/construction.py", dòng 511, trong run_config CloudFormationCarpenter (config, self._auth_config) .build (worklog) Tệp "/ usr/lib/python2.6/site-packages/cfnbootstrap/construction.py ", dòng 247, trong xây dựng thay đổi ['lệnh'] = CommandTool(). áp dụng (self._config.commands) Tệp"/usr/lib/python2.6/site-packages/cfnbootstrap/command_tool.py ", dòng 113, khi áp dụng nâng cao ToolError (u" Lệnh% s không thành công "% name) ToolError: Các móc lệnh không thành công 2014-05-20 23: 35: 04,652 [DEBUG] Ứng dụng CloudFormation được khởi tạo với điểm cuối https://cloudformation.us-west-1.amazonaws.com 2014-05-20 23: 35: 04,653 [DEBUG] Mô tả tài nguyên AWSEBAutoScalingGroup trong ngăn xếp arn: aws: cloudformation: us-west-1 : 040951787496: ngăn xếp/awseb-e-yz93miu6ma-ngăn xếp/1bd7f720-da3f-11e3-a5f1-50fa003f9896

Bất kỳ ý tưởng nào?

Cảm ơn

Trả lời

10

Tôi gặp sự cố tương tự trên bundle_install.sh, sử dụng $> eb logs và kiểm tra /var/log/directory-hooks-executor.log của bạn, với tôi nó không thành công khi cài đặt gem 'forem'.

+0

Tôi gặp lỗi tương tự nhưng gặp sự cố khi xác định vị trí của lỗi. Đây là lần đầu tiên tôi đọc nhật ký ... bạn có thể đưa ra hướng dẫn không? http://stackoverflow.com/questions/25967427/error-on-first-git-aws-push-to-elastic-beanstalk – MicFin

1

Tôi gặp lỗi tương tự: /opt/elasticbeanstalk/hooks/appdeploy/pre/10_composer_install.sh failed with returncode 255 hóa ra đó là nhà soạn nhạc thủ phạm.

Các sáng lập các bản ghi trong /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 

Theo github issue này trong những cách để sửa lỗi này là tăng memory_limit trong php.ini.

1

Tôi vừa giải quyết một lỗi tương tự. Có vẻ như Elastic Beanstalk không thể đối phó với tình trạng xấu trên một trong các trường hợp, và đơn giản là không thể triển khai nó, gây ra một sự bất ổn chung trong môi trường EB.

Tôi đã giải quyết nó bằng cách giảm số lượng phiên bản xuống 1 và triển khai lại. Điều này chỉ giữ một trường hợp tốt, giết chết một vấn đề, và giải quyết vấn đề.

Các vấn đề liên quan