Rails 服务器死于 EAFNOSUPPORT - Windows 10,Ruby 2.4,Rails 4.2,Thin
Rails Server dies with EAFNOSUPPORT - Windows 10, Ruby 2.4, Rails 4.2,Thin
我可以 运行 收集任务和控制台,但是在我向它发出任何请求之前,开发服务器在启动后不久就死机了。
根据 ::1 地址,它似乎与 IPV6 有关,但我找不到可以做任何事情的地方。
有什么想法吗?
C:\Rails Projects\cfhtrust>rails s
[factory_girl warning, below]
=> Booting Thin
=> Rails 4.2.11 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[eventmachine warnings below]
Thin web server (v1.7.2 codename Bachmanity)
Maximum connections set to 1024
Listening on localhost:3000, CTRL+C to stop
Exiting
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:1054:in `bind': An address incompatible with the requested protocol was used. - bind(2) for [::1]:3000 (Errno::EAFNOSUPPORT)
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:1054:in `start_server'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:185:in `start_tcp_server'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:531:in `start_server'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/backends/tcp_server.rb:16:in `connect'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/backends/base.rb:63:in `block in start'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:1545:in `event_callback'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:571:in `block in run_timers'
from C:/Ruby24/lib/ruby/2.4.0/set.rb:699:in `each'
from C:/Ruby24/lib/ruby/2.4.0/set.rb:699:in `each'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:568:in `run_timers'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:551:in `block in run'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:547:in `loop'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:547:in `run'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:144:in `run_machine'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/backends/base.rb:73:in `start'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/server.rb:162:in `start'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/rack-1.6.2/lib/rack/handler/thin.rb:19:in `run'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/rack-1.6.2/lib/rack/server.rb:286:in `start'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/railties-4.2.11/lib/rails/commands/server.rb:80:in `start'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/railties-4.2.11/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/railties-4.2.11/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/railties-4.2.11/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/railties-4.2.11/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/railties-4.2.11/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
我在启动服务器时看到这些警告,但是当我启动 Rails 控制台然后 Rails 控制台工作时我看到同样的事情,所以这让我有理由相信这些并不是杀死服务器的真正的表演障碍。
DEPRECATION WARNING: The factory_girl gem is deprecated. Please upgrade to factory_bot. See https://github.com/thoughtbot/factory_bot/blob/v4.9.0/UPGRADE_FROM_FACTORY_GIRL.md for further instructions. (called from require at C:/Ruby24/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81)
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:467: warning: already initialized constant EventMachine::TimerFired
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:469: warning: already initialized constant EventMachine::ConnectionData
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:471: warning: already initialized constant EventMachine::ConnectionUnbound
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:473: warning: already initialized constant EventMachine::ConnectionAccepted
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:475: warning: already initialized constant EventMachine::ConnectionCompleted
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:477: warning: already initialized constant EventMachine::LoopbreakSignalled
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:479: warning: already initialized constant EventMachine::ConnectionNotifyReadable
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:481: warning: already initialized constant EventMachine::ConnectionNotifyWritable
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:483: warning: already initialized constant EventMachine::SslHandshakeCompleted
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:485: warning: already initialized constant EventMachine::SslVerify
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:487: warning: already initialized constant EventMachine::EM_PROTO_SSLv2
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:489: warning: already initialized constant EventMachine::EM_PROTO_SSLv3
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:491: warning: already initialized constant EventMachine::EM_PROTO_TLSv1
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:493: warning: already initialized constant EventMachine::EM_PROTO_TLSv1_1
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:495: warning: already initialized constant EventMachine::EM_PROTO_TLSv1_2
我通过切换到 Puma 并使用
将其强制为 IPv6 获得了服务器 运行
rails s -b [::]
这可能是解决方法而不是答案。我怀疑是公司设置或防火墙问题阻碍了 127.0.0.1:3000
,但我从未得到明确的答案。
我可以 运行 收集任务和控制台,但是在我向它发出任何请求之前,开发服务器在启动后不久就死机了。
根据 ::1 地址,它似乎与 IPV6 有关,但我找不到可以做任何事情的地方。
有什么想法吗?
C:\Rails Projects\cfhtrust>rails s
[factory_girl warning, below]
=> Booting Thin
=> Rails 4.2.11 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[eventmachine warnings below]
Thin web server (v1.7.2 codename Bachmanity)
Maximum connections set to 1024
Listening on localhost:3000, CTRL+C to stop
Exiting
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:1054:in `bind': An address incompatible with the requested protocol was used. - bind(2) for [::1]:3000 (Errno::EAFNOSUPPORT)
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:1054:in `start_server'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:185:in `start_tcp_server'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:531:in `start_server'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/backends/tcp_server.rb:16:in `connect'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/backends/base.rb:63:in `block in start'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:1545:in `event_callback'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:571:in `block in run_timers'
from C:/Ruby24/lib/ruby/2.4.0/set.rb:699:in `each'
from C:/Ruby24/lib/ruby/2.4.0/set.rb:699:in `each'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:568:in `run_timers'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:551:in `block in run'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:547:in `loop'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:547:in `run'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:144:in `run_machine'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/backends/base.rb:73:in `start'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin/server.rb:162:in `start'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/rack-1.6.2/lib/rack/handler/thin.rb:19:in `run'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/rack-1.6.2/lib/rack/server.rb:286:in `start'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/railties-4.2.11/lib/rails/commands/server.rb:80:in `start'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/railties-4.2.11/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/railties-4.2.11/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/railties-4.2.11/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/railties-4.2.11/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby24/lib/ruby/gems/2.4.0/gems/railties-4.2.11/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
我在启动服务器时看到这些警告,但是当我启动 Rails 控制台然后 Rails 控制台工作时我看到同样的事情,所以这让我有理由相信这些并不是杀死服务器的真正的表演障碍。
DEPRECATION WARNING: The factory_girl gem is deprecated. Please upgrade to factory_bot. See https://github.com/thoughtbot/factory_bot/blob/v4.9.0/UPGRADE_FROM_FACTORY_GIRL.md for further instructions. (called from require at C:/Ruby24/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81)
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:467: warning: already initialized constant EventMachine::TimerFired
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:469: warning: already initialized constant EventMachine::ConnectionData
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:471: warning: already initialized constant EventMachine::ConnectionUnbound
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:473: warning: already initialized constant EventMachine::ConnectionAccepted
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:475: warning: already initialized constant EventMachine::ConnectionCompleted
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:477: warning: already initialized constant EventMachine::LoopbreakSignalled
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:479: warning: already initialized constant EventMachine::ConnectionNotifyReadable
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:481: warning: already initialized constant EventMachine::ConnectionNotifyWritable
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:483: warning: already initialized constant EventMachine::SslHandshakeCompleted
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:485: warning: already initialized constant EventMachine::SslVerify
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:487: warning: already initialized constant EventMachine::EM_PROTO_SSLv2
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:489: warning: already initialized constant EventMachine::EM_PROTO_SSLv3
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:491: warning: already initialized constant EventMachine::EM_PROTO_TLSv1
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:493: warning: already initialized constant EventMachine::EM_PROTO_TLSv1_1
C:/Ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb:495: warning: already initialized constant EventMachine::EM_PROTO_TLSv1_2
我通过切换到 Puma 并使用
将其强制为 IPv6 获得了服务器 运行rails s -b [::]
这可能是解决方法而不是答案。我怀疑是公司设置或防火墙问题阻碍了 127.0.0.1:3000
,但我从未得到明确的答案。