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

Bundler::HTTPError: Network error while fetching #2769

Closed
crigor opened this issue Dec 19, 2013 · 7 comments
Closed

Bundler::HTTPError: Network error while fetching #2769

crigor opened this issue Dec 19, 2013 · 7 comments

Comments

@crigor
Copy link

crigor commented Dec 19, 2013

I ran bundle install on a new Ubuntu 12.04 server. It was taking a long time (more than 15 minutes) and I didn't wait for it to finish.

Adding --verbose shows Bundler::HTTPError: Network error while fetching.

Fetching from: http://bundler.rubygems.org/api/v1/dependencies?gems=rake,multi_json,activesupport,bcrypt-ruby,builder,i18n,activemodel,erubis,rack,rack-cache,rack-mount,rack-test,hike,tilt,sprockets,actionpack,mime-types,polyglot,treetop,mail,actionmailer,sass,bourbon,orm_adapter,rack-ssl,json,rdoc,thor,railties,warden,devise,fastercsv,arel,tzinfo,activerecord,activeresource,rails,formtastic,has_scope,responders,inherited_resources,jquery-rails,kaminari,polyamorous,meta_search,activeadmin,acts_as_commentable,addressable,airbrake,awesome_print,cancan,nokogiri,ffi,childprocess,json_pure,rubyzip,selenium-webdriver,xpath,capybara,carmen,cocaine,coffee-script-source,execjs,coffee-script,coffee-rails,diff-lcs,gherkin,term-ansicolor,cucumber,cucumber-rails,database_cleaner,dynamic_form,rspec-core,rspec-expectations,rspec-mocks,rspec,email_spec,factory_girl,haml,haml-rails,kgio,launchy,libv8,mysql2,paperclip,raindrops,riddle,sass-rails,simple_form,therubyracer,thinking-sphinx,tinymce-rails,uglifier,unicorn,will_paginate
Error during API request. Bundler::HTTPError: Network error while fetching http://bundler.rubygems.org/api/v1/dependencies?gems=rake,multi_json,activesupport,bcrypt-ruby,builder,i18n,activemodel,erubis,rack,rack-cache,rack-mount,rack-test,hike,tilt,sprockets,actionpack,mime-types,polyglot,treetop,mail,actionmailer,sass,bourbon,orm_adapter,rack-ssl,json,rdoc,thor,railties,warden,devise,fastercsv,arel,tzinfo,activerecord,activeresource,rails,formtastic,has_scope,responders,inherited_resources,jquery-rails,kaminari,polyamorous,meta_search,activeadmin,acts_as_commentable,addressable,airbrake,awesome_print,cancan,nokogiri,ffi,childprocess,json_pure,rubyzip,selenium-webdriver,xpath,capybara,carmen,cocaine,coffee-script-source,execjs,coffee-script,coffee-rails,diff-lcs,gherkin,term-ansicolor,cucumber,cucumber-rails,database_cleaner,dynamic_form,rspec-core,rspec-expectations,rspec-mocks,rspec,email_spec,factory_girl,haml,haml-rails,kgio,launchy,libv8,mysql2,paperclip,raindrops,riddle,sass-rails,simple_form,therubyracer,thinking-sphinx,tinymce-rails,uglifier,unicorn,will_paginate
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/fetcher.rb:211:in `rescue in fetch' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/fetcher.rb:199:in `fetch' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/fetcher.rb:222:in `fetch' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/fetcher.rb:242:in `fetch_dependency_remote_specs' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/fetcher.rb:151:in `fetch_remote_specs' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/fetcher.rb:106:in `specs' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/source/rubygems.rb:235:in `block in remote_specs' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/source/rubygems.rb:235:in `each' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/source/rubygems.rb:235:in `remote_specs' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/source/rubygems.rb:163:in `fetch_specs' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/source/rubygems.rb:67:in `specs' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/lazy_specification.rb:52:in `__materialize__' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:88:in `block in materialize' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `map!' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `materialize' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:109:in `resolve_remotely!' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/installer.rb:83:in `run' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/installer.rb:14:in `install' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/cli.rb:247:in `install' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start' /var/lib/gems/1.9.1/gems/bundler-1.3.5/bin/bundle:20:in `block in <top (required)>' /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors' /var/lib/gems/1.9.1/gems/bundler-1.3.5/bin/bundle:20:in `<top (required)>' /usr/local/bin/bundle:19:in `load' /usr/local/bin/bundle:19:in `<main>'

It then proceeds on fetching all (not just for the gems I need) gemspec.rz which would take a long time. It started with http://rubygems.org/quick/Marshal.4.8/_-1.0.gemspec.rz and after a few minutes it's still on gems starting with 'a'.

I found #2618, added --full-index and it worked.

I tried again just now (after 8 hours of the initial problem) by uninstalling libv8. bundle install --verbose works. It would still be good to know what happened and why --full-index fixes it.

More details at https://gist.github.com/crigor/7bd937ce9dd10d0a8c01.

@indirect
Copy link
Member

The dependency API went down during the period you're talking about. There is a bug in the current version of Bundler that downloads tons of gemspecs needlessly when the dependency API is down. :/

The Dependency API is now back up, and the bug that downloads all the gemspecs is fixed in the latest version of Bundler. You can try the release candidate by running gem install bundler --pre.

@crigor
Copy link
Author

crigor commented Dec 20, 2013

Thanks for the information. Good to know it's fixed in the latest version. Btw, http://status.rubygems.org/ was all green including Dependency API during that time.

@indirect
Copy link
Member

Hmm. I don’t actually know how the dependency API checker works, but the outage wasn’t full—the API was still responding to as many requests as it could, but failing to respond to enough of them that you hit at least one bad one.

On Dec 19, 2013, at 11:27 PM, Christopher Rigor notifications@github.com wrote:

Thanks for the information. Good to know it's fixed in the latest version. Btw, http://status.rubygems.org/ was all green including Dependency API during that time.


Reply to this email directly or view it on GitHub.

@mgidea
Copy link

mgidea commented May 14, 2014

I was having this issue. After bundle installing many times with various levels of failure while fetching from "http://rubygems.org" and "https://rubygems.org" running "curl https://rubygems.org" failed as well. After running "curl https://rubygems.org --verbose" everything worked.

@TimMoore
Copy link
Contributor

@mgidea that sounds like it was just a temporary outage of rubygems.org or a problem on your network.

@indirect
Copy link
Member

We should probably rescue this error and say that we couldn't connect, check your network and status.rubygems.org and try again.

On Wed, May 14, 2014 at 7:25 PM, Tim Moore notifications@github.com
wrote:

@mgidea that sounds like it was just a temporary outage of rubygems.org or a problem on your network.

Reply to this email directly or view it on GitHub:
#2769 (comment)

@TimMoore
Copy link
Contributor

Good idea! rubygems/bundler-features#53

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

No branches or pull requests

4 participants