sonatype / nexus-ruby-support

26 stars 7 forks source link

HTTPError when using a Repository Group #50

Closed tstoneba closed 10 years ago

tstoneba commented 10 years ago

When using the Repository Group URL I get network errors. I can work around this by listing the repositories in the group individually as gem sources but would prefer to us a single URL. Using Nexus OSS 2.7.1-01

Error: Fetching gem metadata from http://xlddevtools01:8081/nexus/content/groups/GemsGroup/.....Retrying dependency api due to error (2/3): Bundler::HTTPError Network error while fetching http://xlddevtools01:8081/nexus/content/groups/GemsGroup/api/v1/dependencies?gems=facets%20%3E=2.0.0%0A,,language,facets_core,facets_more,daemons,eventmachine-le,http_parser.rb,preforker,shoulda-context,shoulda-matchers,faraday-middleware,httpauth,tins,mongrel,tilt,backports,rack-protection,SexpProcessor Retrying dependency api due to error (3/3): Bundler::HTTPError Network error while fetching http://xlddevtools01:8081/nexus/content/groups/GemsGroup/api/v1/dependencies?gems=facets%20%3E=2.0.0%0A,,language,facets_core,facets_more,daemons,eventmachine-le,http_parser.rb,preforker,shoulda-context,shoulda-matchers,faraday-middleware,httpauth,tins,mongrel,tilt,backports,rack-protection,SexpProcessor

mkristian commented 10 years ago

are you saying referencing the proxy and hosted directly in your Gemfile works without the errors ?

tstoneba commented 10 years ago

Yes. That works without errors.

Tony Stonebarger — Reply to this email directly or view it on GitHubhttps://github.com/sonatype/nexus-ruby-support/issues/50#issuecomment-36102888.

mkristian commented 10 years ago

I tried to reproduce you problem - well I did not succeed.

could you first use the latest code of the nexus-ruby-plugin and then it would be nice to see the server log (preferable with debug logging enabled) to see what is going on the server side of things.

gmanfunky commented 10 years ago

I think I ran into something like this too. It's like it gets into a loop or a deadlock when using the /dependencies?gems= API

This may not be called by "gem install" but it seems our chef cookbooks try to query it.

Problem behavior demonstrated with the following: curl -v http://localhost:8081/nexus/content/repositories/rubygems/api/v1/dependencies?gems=ruby-mysql

Nexus debug logs seem to show a bit of a loop and halt - https://gist.github.com/gmanfunky/9637121

I don't yet have an environment to build and try the latest and greatest, but it showed up in a snapshot pulled down January 20, 2014 - https://github.com/sonatype/nexus-ruby-support/commit/a2cd94346b45d378e50632b8c784c139415f7f65

(Also tested on a Nexus 2.7.1-01 install. )

mkristian commented 10 years ago

@gmanfunky so you are saying the debug log stop at the end of your gist. there were some deadlocks recently which happens when you forget to close a stream then further read-write-locks hang, i.e. I found a few places where the stream was not closed. if you can not compile the latest/greatest code then just grab the bundle from here: https://oss.sonatype.org/content/repositories/central_bundles-1850/org/sonatype/nexus/plugins/nexus-ruby-plugin/1.2.0/nexus-ruby-plugin-1.2.0-bundle.zip

actually it would be great if you could test that because in case it still shows your error, it is still possible to stop the release to maven central ;) but from my side I would say those deadlocks are gone.

currently the bundler API for the proxy uses the same code as for hosted repos and there I need all the *.gemspec.rz file from a given gem and that can take a lot of time to download from rubygems.org (even with fast internet access). currently I am working on that.

mkristian commented 10 years ago

from nexus-ruby-plugin-1.3.x onward the whole bundler API got a new implementation. these error should be gone unless you have a slow internet connection where some timeout on bundler will be triggered and bundler uses the specs.4.8.gz data to resolve transitive dependencies.

I consider the issue to be closed for those newer plugins.