Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Fail gracefully on Errno::EHOSTUNREACH in Fetcher::Downloader #4642

Closed
h-gupta opened this issue Jun 3, 2016 · 5 comments
Closed

Fail gracefully on Errno::EHOSTUNREACH in Fetcher::Downloader #4642

h-gupta opened this issue Jun 3, 2016 · 5 comments

Comments

@h-gupta
Copy link

h-gupta commented Jun 3, 2016

please note that it is kali linux rolling edition.whenever i try to run bundle install it shows this issue.
HELP.
here is my error template

Error details

Errno::EHOSTUNREACH: Failed to open TCP connection to index.rubygems.org:443 (No route to host - connect(2) for "index.rubygems.org" port 443)
  /usr/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect'
  /usr/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
  /usr/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
  /usr/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
  /usr/lib/ruby/2.3.0/net/http.rb:878:in `connect'
  /usr/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
  /usr/lib/ruby/2.3.0/net/http.rb:858:in `start'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/net/http/persistent.rb:700:in `start'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/net/http/persistent.rb:631:in `connection_for'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/net/http/persistent.rb:994:in `request'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/fetcher/downloader.rb:48:in `request'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/fetcher/downloader.rb:16:in `fetch'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/fetcher/compact_index.rb:81:in `block in compact_index_client'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb:42:in `block in update'
  /usr/lib/ruby/2.3.0/tmpdir.rb:89:in `mktmpdir'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb:29:in `update'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:64:in `update'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb:55:in `update_and_parse_checksums!'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/fetcher/compact_index.rb:65:in `available?'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/fetcher/compact_index.rb:15:in `call'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/fetcher/compact_index.rb:15:in `block in compact_index_request'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/fetcher.rb:154:in `use_api'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:331:in `block in api_fetchers'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:331:in `select'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:331:in `api_fetchers'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:336:in `block in remote_specs'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/index.rb:10:in `build'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:335:in `remote_specs'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:82:in `specs'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/lazy_specification.rb:56:in `__materialize__'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/spec_set.rb:91:in `block in materialize'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:in `map!'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:in `materialize'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/definition.rb:140:in `specs'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/definition.rb:129:in `resolve_remotely!'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/installer.rb:195:in `resolve_if_need'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/installer.rb:70:in `run'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/installer.rb:22:in `install'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/cli/install.rb:102:in `run'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/cli.rb:175:in `install'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/cli.rb:11:in `start'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/exe/bundle:27:in `block in <top (required)>'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
  /var/lib/gems/2.3.0/gems/bundler-1.12.5/exe/bundle:19:in `<top (required)>'
  /usr/local/bin/bundle:23:in `load'
  /usr/local/bin/bundle:23:in `<main>'

Environment

Bundler 1.12.5
Rubygems 2.5.1
Ruby 2.3.1p112 (2016-04-26 revision 0) [i386-linux-gnu]
GEM_HOME /var/lib/gems/2.3.0
GEM_PATH /var/lib/gems/2.3.0:/root/.gem/ruby/2.3.0:/usr/lib/i386-linux-gnu/rubygems-integration/2.3.0:/usr/share/rubygems-integration/2.3.0:/usr/share/rubygems-integration/all
Git 2.8.1

  Bundler settings

orig_path
Set via BUNDLE_ORIG_PATH: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
--- TEMPLATE END ----------------------------------------------------------------

@hmistry
Copy link
Contributor

hmistry commented Jun 6, 2016

Looking at the first line of the error, its says bundler is unable to open a connection to index.rubygems.org. I suggest trying again - make sure your system is connected to the internet and you can ping the server.

@coilysiren
Copy link
Contributor

Ditto what @hmistry said, this is likely a internet connection issue. I'm going to close this, but if you run into any new issues you think are caused by Bundler code, we can re-open this or create a new issue.

@segiddins segiddins reopened this Jun 6, 2016
@segiddins
Copy link
Member

@lynnco still shouldn't cause the error template to appear -- we should probably add Errno::EHOSTUNREACH to the list of HTTP_ERRORS

@coilysiren
Copy link
Contributor

coilysiren commented Jun 6, 2016

@segiddins I'd create a new issue for that or change the title of this one, I figure most people will see the current title and ignore it.

@segiddins segiddins changed the title Unfortunately, an unexpected error occurred, and Bundler cannot continue. Fail gracefully on Errno::EHOSTUNREACH in Fetcher::Downloader Jun 6, 2016
@allenzhao
Copy link
Contributor

I will work on this and to add this and a spec test

homu added a commit that referenced this issue Jun 10, 2016
Fail gracefully on Errno::EHOSTUNREACH

Close #4642
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants