嘿伙计们我正在尝试使用弹性beanstalk将我的代码部署到AWS,但在环境创建期间一直遇到错误。
最初我收到一条错误,说明我的ruby版本不是2.3.1所以我将ruby调整为2.3.1,但现在我收到了大量错误。
这是部署中的错误日志。这是我的红宝石版本的问题还是其他只是造成混乱?
任何帮助都会受到大力赞赏!
-------------------------------------
/var/app/support/logs/passenger.log
-------------------------------------
[ 2017-03-22 13:31:02.5628 4511/7f352908f780 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'webapp', 'cleanup_pidfiles' => 'L3RtcC9wYXNzZW5nZXItc3RhbmRhbG9uZS54N2pja2svdGVtcF9kaXJfdG91Y2hlci5waWQ=', 'default_group' => 'webapp', 'default_python' => 'python', 'default_ruby' => '/opt/rubies/ruby-2.3.1/bin/ruby', 'default_user' => 'webapp', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/tmp/passenger-standalone.x7jckk/locations.ini', 'passenger_version' => '4.0.60', 'pool_idle_time' => '300', 'prestart_urls' => 'aHR0cDovLzAuMC4wLjA6ODAA', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'false', 'web_server_passenger_version' => '4.0.60', 'web_server_pid' => '4510', 'web_server_type' => 'nginx', 'web_server_worker_gid' => '495', 'web_server_worker_uid' => '497' }
[ 2017-03-22 13:31:02.9945 4514/7f2bb74b7780 agents/HelperAgent/Main.cpp:650 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.4510/generation-0/request
[ 2017-03-22 13:31:03.2871 4522/7faa73974840 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.4510/generation-0/logging
[ 2017-03-22 13:31:03.2875 4511/7f352908f780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
2017/03/22 13:31:05 [error] 4530#0: *3 "/var/app/current/public/index.html" is not found (2: No such file or directory), client: 127.0.0.1, server: _, request: "HEAD / HTTP/1.1", host: "0.0.0.0"
2017/03/22 13:31:05 [error] 4530#0: *3 testing "/var/app/current/public" existence failed (2: No such file or directory) while logging request, client: 127.0.0.1, server: _, request: "HEAD / HTTP/1.1", host: "0.0.0.0"
-------------------------------------
/var/log/eb-activity.log
-------------------------------------
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/nio4r-1.2.1/ext/nio4r
/opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-nnwsbm.rb extconf.rb
Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-nnwsbm.rb extconf.rb 2>&1
Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/nio4r-1.2.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/nio4r-1.2.1/gem_make.out
Installing websocket-extensions 0.1.2
Installing mime-types-data 3.2016.0521
Installing arel 7.1.4
Installing execjs 2.7.0
Installing awesome_print 1.7.0
Installing aws-sigv4 1.0.0
Installing jmespath 1.3.1
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 ./siteconf20170322-4741-1ix2vs1.rb extconf.rb
Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1ix2vs1.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-3.1.11 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-3.1.11/gem_make.out
Installing sass 3.4.23
Installing climate_control 0.1.0
Installing coffee-script-source 1.12.2
Installing method_source 0.8.2
Installing thor 0.19.4
Installing deep_merge 1.1.1
Installing orm_adapter 0.5.0
Installing unf_ext 0.0.7.2 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/unf_ext-0.0.7.2/ext/unf_ext
/opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1ub1f2j.rb extconf.rb
Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1ub1f2j.rb extconf.rb 2>&1
Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.7.2 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/unf_ext-0.0.7.2/gem_make.out
Installing rubyzip 1.2.1
Installing table_print 1.5.6
Installing hirb 0.7.3
Installing multi_json 1.12.1
Installing mimemagic 0.3.0
Installing netrc 0.11.0
Installing pg 0.20.0 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/pg-0.20.0/ext
/opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1bl1ee1.rb extconf.rb
Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1bl1ee1.rb extconf.rb 2>&1
Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/pg-0.20.0 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/pg-0.20.0/gem_make.out
Installing puma 3.4.0 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/puma-3.4.0/ext/puma_http11
/opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1o1w6ja.rb extconf.rb
Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1o1w6ja.rb extconf.rb 2>&1
Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.4.0 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/puma-3.4.0/gem_make.out
Using bundler 1.12.1
Installing tilt 2.0.7
Installing turbolinks-source 5.0.0
Installing tzinfo 1.2.2
Installing nokogiri 1.7.1 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/nokogiri-1.7.1/ext/nokogiri
/opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1jbrlyp.rb extconf.rb
Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1jbrlyp.rb extconf.rb 2>&1
Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.7.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/nokogiri-1.7.1/gem_make.out
Installing rack-test 0.6.3
Installing warden 1.2.7
Installing sprockets 3.7.1
An error occurred while installing nio4r (1.2.1), and Bundler cannot continue.
Make sure that `gem install nio4r -v '1.2.1'` succeeds before bundling. (Executor::NonZeroExitStatus)
[2017-03-22T13:32:18.892Z] INFO [4678] - [Application deployment railsapp-source@1/StartupStage0/AppDeployPreHook/10_bundle_install.sh] : Activity failed.
[2017-03-22T13:32:18.892Z] INFO [4678] - [Application deployment railsapp-source@1/StartupStage0/AppDeployPreHook] : Activity failed.
[2017-03-22T13:32:18.892Z] INFO [4678] - [Application deployment railsapp-source@1/StartupStage0] : Activity failed.
[2017-03-22T13:32:18.893Z] INFO [4678] - [Application deployment railsapp-source@1] : Completed activity. Result:
Application deployment - Command CMD-Startup failed
[2017-03-22T13:35:14.810Z] INFO [5422] - [CMD-TailLogs] : Starting activity...
[2017-03-22T13:35:14.811Z] INFO [5422] - [CMD-TailLogs/AddonsBefore] : Starting activity...
[2017-03-22T13:35:14.811Z] INFO [5422] - [CMD-TailLogs/AddonsBefore] : Completed activity.
[2017-03-22T13:35:14.811Z] INFO [5422] - [CMD-TailLogs/TailLogs] : Starting activity...
[2017-03-22T13:35:14.811Z] INFO [5422] - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity...
-------------------------------------
/var/app/support/logs/access.log
-------------------------------------
127.0.0.1 - - [22/Mar/2017:13:31:05 +0000] "HEAD / HTTP/1.1" 404 0 "-" "-"
-------------------------------------
/var/log/eb-commandprocessor.log
-------------------------------------
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 ./siteconf20170322-4741-1ix2vs1.rb extconf.rb
Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1ix2vs1.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-3.1.11 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-3.1.11/gem_make.out
Installing sass 3.4.23
Installing climate_control 0.1.0
Installing coffee-script-source 1.12.2
Installing method_source 0.8.2
Installing thor 0.19.4
Installing deep_merge 1.1.1
Installing orm_adapter 0.5.0
Installing unf_ext 0.0.7.2 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/unf_ext-0.0.7.2/ext/unf_ext
/opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1ub1f2j.rb extconf.rb
Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1ub1f2j.rb extconf.rb 2>&1
Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.7.2 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/unf_ext-0.0.7.2/gem_make.out
Installing rubyzip 1.2.1
Installing table_print 1.5.6
Installing hirb 0.7.3
Installing multi_json 1.12.1
Installing mimemagic 0.3.0
Installing netrc 0.11.0
Installing pg 0.20.0 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/pg-0.20.0/ext
/opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1bl1ee1.rb extconf.rb
Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1bl1ee1.rb extconf.rb 2>&1
Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/pg-0.20.0 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/pg-0.20.0/gem_make.out
Installing puma 3.4.0 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/puma-3.4.0/ext/puma_http11
/opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1o1w6ja.rb extconf.rb
Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1o1w6ja.rb extconf.rb 2>&1
Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.4.0 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/puma-3.4.0/gem_make.out
Using bundler 1.12.1
Installing tilt 2.0.7
Installing turbolinks-source 5.0.0
Installing tzinfo 1.2.2
Installing nokogiri 1.7.1 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/nokogiri-1.7.1/ext/nokogiri
/opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1jbrlyp.rb extconf.rb
Cannot allocate memory - /opt/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170322-4741-1jbrlyp.rb extconf.rb 2>&1
Gem files will remain installed in /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.7.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/nokogiri-1.7.1/gem_make.out
Installing rack-test 0.6.3
Installing warden 1.2.7
Installing sprockets 3.7.1
An error occurred while installing nio4r (1.2.1), and Bundler cannot continue.
Make sure that `gem install nio4r -v '1.2.1'` succeeds before bundling. (Executor::NonZeroExitStatus)
[2017-03-22T13:32:18.893Z] ERROR [4678] : Command CMD-Startup failed!
[2017-03-22T13:32:18.894Z] INFO [4678] : Command processor returning results:
{"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"(TRUNCATED)...nokogiri-1.7.1/gem_make.out\nInstalling rack-test 0.6.3\nInstalling warden 1.2.7\nInstalling sprockets 3.7.1\nAn error occurred while installing nio4r (1.2.1), and Bundler cannot continue.\nMake sure that `gem install nio4r -v '1.2.1'` succeeds before bundling. \nHook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI","returncode":5,"events":[]}],"truncated":"true"}
[2017-03-22T13:35:14.795Z] DEBUG [5422] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-03-22T13:35:14.797Z] DEBUG [5422] : Checking if the command processor should execute...
[2017-03-22T13:35:14.800Z] DEBUG [5422] : Checking whether the command is applicable to instance (i-07665a49f1f6642b8)..
[2017-03-22T13:35:14.800Z] INFO [5422] : Command is applicable to this instance (i-07665a49f1f6642b8)..
[2017-03-22T13:35:14.800Z] DEBUG [5422] : Checking if the received command stage is valid..
[2017-03-22T13:35:14.800Z] INFO [5422] : No stage_num in command. Valid stage..
[2017-03-22T13:35:14.800Z] INFO [5422] : Received command CMD-TailLogs: {"execution_data":"