AWSのEBを使ってRailsアプリを作っています。最近Rubyの2.3対応があったのが原因かDeployでInternalServerErrorとなってしまいました。
logを確認しましたが、Gemfileの問題かなとも思って手も加えたけど一向に治らないので何が問題なのか皆さんに伺いたいと思います。
ちなみにエラーはこちらです。
$ eb deploy Creating application version archive "app-e203-160711_195226". Uploading vegewel/app-e203-160711_195226.zip to S3. This may take a while. Upload Complete. INFO: Environment update is starting. INFO: Environment health has transitioned from Ok to Info. Application update in progress (running for 8 seconds). INFO: Deploying new version to instance(s). ERROR: [Instance: i-e1427b6e] Command failed on instance. Return code: 5 Output: (TRUNCATED)...ogiri-1.6.8/gem_make.out Installing rack-test 0.6.3 Installing warden 1.2.6 Installing mime-types 3.1 An error occurred while installing bcrypt (3.1.11), and Bundler cannot continue. Make sure that `gem install bcrypt -v '3.1.11'` succeeds before bundling. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.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-e1427b6e'. Aborting the operation. ERROR: Failed to deploy application.
以下はEBのログです。すみません。どうかよろしくお願いします。
log
1------------------------------------- 2/var/log/eb-activity.log 3------------------------------------- 4 Using minitest 5.9.0 5 Using thread_safe 0.3.5 6 Using builder 3.2.2 7 Using erubis 2.7.0 8 Using mini_portile2 2.1.0 9 Using pkg-config 1.1.7 10 Using rack 1.6.4 11 Using mime-types-data 3.2016.0521 12 Using arel 6.0.3 13 Installing bcrypt 3.1.11 with native extensions 14 15 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 16 17 current directory: /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11/ext/mri 18 /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160712-3817-15n8rh.rb extconf.rb 19 Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160712-3817-15n8rh.rb extconf.rb 2>&1 20 21 Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11 for inspection. 22 Results logged to /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0-static/bcrypt-3.1.11/gem_make.out 23 Installing bcrypt-ruby 3.0.1 with native extensions 24 25 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 26 27 current directory: /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bcrypt-ruby-3.0.1/ext/mri 28 /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160712-3817-1u94pop.rb extconf.rb 29 Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160712-3817-1u94pop.rb extconf.rb 2>&1 30 31 Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bcrypt-ruby-3.0.1 for inspection. 32 Results logged to /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0-static/bcrypt-ruby-3.0.1/gem_make.out 33 Using coffee-script-source 1.10.0 34 Using execjs 2.7.0 35・・・ 36 Using multi_xml 0.5.5 37 Installing mysql2 0.3.21 with native extensions 38 39 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 40 41 current directory: /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/mysql2-0.3.21/ext/mysql2 42 /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160712-3817-1t5zuj3.rb extconf.rb 43 Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160712-3817-1t5zuj3.rb extconf.rb 2>&1 44 45 Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/mysql2-0.3.21 for inspection. 46 Results logged to /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0-static/mysql2-0.3.21/gem_make.out 47 Using oauth 0.5.1 48 Using puma 2.16.0 49 Using bundler 1.12.1 50 Using ref 2.0.0 51 Using sass 3.4.22 52 Using temple 0.7.7 53 Installing sqlite3 1.3.11 with native extensions 54 55 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 56 57 current directory: /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11/ext/sqlite3 58 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 59 60 current directory: /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11/ext/sqlite3 61 /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160712-3817-t6vved.rb extconf.rb 62 Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160712-3817-t6vved.rb extconf.rb 2>&1 63 64 Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11 for inspection. 65 Results logged to /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0-static/sqlite3-1.3.11/gem_make.out 66 Using i18n-active_record 0.1.0 67 Using rdoc 4.2.2 68 Using tzinfo 1.2.2 69 Installing nokogiri 1.6.8 with native extensions 70 71 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 72 current directory: /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.8/ext/nokogiri 73 /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160712-3817-1b5hlk5.rb extconf.rb 74 Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160712-3817-1b5hlk5.rb extconf.rb 2>&1 75 76 Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.8 for inspection. 77 Results logged to /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0-static/nokogiri-1.6.8/gem_make.out 78 Using rack-test 0.6.3 79 Using warden 1.2.6 80 Using mime-types 3.1 81 An error occurred while installing bcrypt (3.1.11), and Bundler cannot continue. 82 Make sure that `gem install bcrypt -v '3.1.11'` succeeds before bundling. (Executor::NonZeroExitStatus) 83[2016-07-12T00:29:27.386Z] INFO [3740] - [Application update app-882a-160712_092758@67/AppDeployStage0/AppDeployPreHook/10_bundle_install.sh] : Activity failed. 84
【追記】
コメント欄にあるSWAPを増やすのをやってみた結果はこちらです。
shell
1$ eb deploy 2WARNING: You have uncommitted changes. 3Creating application version archive "app-1ca7-160712_215829". 4Uploading vegewel/app-1ca7-160712_215829.zip to S3. This may take a while. 5Upload Complete. 6INFO: Environment update is starting. 7INFO: Deploying new version to instance(s). 8ERROR: [Instance: i-e1427b6e] Command failed on instance. Return code: 5 Output: (TRUNCATED)....3.0-static/nokogiri-1.6.8/gem_make.out 9Using rack-test 0.6.3 10Using warden 1.2.6 11Using mime-types 3.1 12An error occurred while installing bcrypt (3.1.11), and Bundler cannot continue. 13Make sure that `gem install bcrypt -v '3.1.11'` succeeds before bundling. 14Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI. 15INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1]. 16ERROR: Unsuccessful command execution on instance id(s) 'i-e1427b6e'. Aborting the operation. 17ERROR: Failed to deploy application. 18
ログはこちら。
------------------------------------- /var/log/eb-activity.log ------------------------------------- Using minitest 5.9.0 Using thread_safe 0.3.5 Using builder 3.2.2 Using erubis 2.7.0 Using mini_portile2 2.1.0 Using pkg-config 1.1.7 Using rack 1.6.4 Using mime-types-data 3.2016.0521 Using arel 6.0.3 Installing bcrypt 3.1.11 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11/ext/mri /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160712-2852-1lxs4pw.rb extconf.rb Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160712-2852-1lxs4pw.rb extconf.rb 2>&1 Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bcrypt-ruby-3.0.1 for inspection. Results logged to /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0-static/bcrypt-ruby-3.0.1/gem_make.out Using coffee-script-source 1.10.0 Using execjs 2.7.0 Using libv8 3.16.14.15 Using multi_xml 0.5.5 Installing mysql2 0.3.21 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/mysql2-0.3.21/ext/mysql2 /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160712-2852-4yiecm.rb extconf.rb Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160712-2852-4yiecm.rb extconf.rb 2>&1 Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/mysql2-0.3.21 for inspection. Results logged to /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0-static/mysql2-0.3.21/gem_make.out Using sass 3.4.22 Using temple 0.7.7 Installing sqlite3 1.3.11 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/07/12 13:01