webpacker: Getting Errno::ETIMEDOUT

Hi! I’ve added the webpacker gem, after bundle install with the gem, I run rails s and I’m getting this error, I can’t figure out what’s going on. Thanks!

Puma caught this error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - user specified timeout (Errno::ETIMEDOUT) c:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/socket.rb:61:in `connect_internal' c:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/socket.rb:139:in `connect' c:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/socket.rb:636:in `block in tcp' c:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/socket.rb:231:in `each' c:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/socket.rb:231:in `foreach' c:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/socket.rb:626:in `tcp' c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/webpacker-3.0.0/lib/webpacker/dev_server.rb:9:in `running?' c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/webpacker-3.0.0/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response' c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call' c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.3/lib/rails/engine.rb:522:in `call' c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call' c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request' c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client' c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run' c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 33 (19 by maintainers)

Commits related to this issue

Most upvoted comments

This was fixed in https://github.com/rails/webpacker/pull/753, but hasn’t been released yet. You can use it now by pointing your Gemfile to github: 'rails/webpacker'.

I’m experiencing the same thing on the High Sierra beta 9.

Adding rescue Errno::ETIMEDOUT to def running? partially fixes it. JavaScript is compiled, but requests take a long time (3-5 secs).

This takes about 2 seconds to raise an error on High Sierra when the webpack dev server is off: $ curl localhost:3035

In the running? method the timeout is set to 1s, which means ruby raises Errno::ETIMEDOUT before ERR_CONNECTION_REFUSED is raised by macOS.

In my app I’m adding a monkey patch to have running? always return false so I can get back to work, but I’m curious to find out what causes this.

@javan Looks like that did fix it in it Windows 10. Thanks!! What is your schedule for releasing versions?

@mmaauu Did you ever find a solution to this for Windows? I have the same problem on Windows 10.

Hi @gauravtiwari! I can’t find the issue to make it work, I’m running on windows 7, do you have any idea? Thanks!!