Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolv::DNS..getresource produces different errors then MRI #4104

mkristian opened this issue Aug 23, 2016 · 2 comments

Resolv::DNS..getresource produces different errors then MRI #4104

mkristian opened this issue Aug 23, 2016 · 2 comments


Copy link

@mkristian mkristian commented Aug 23, 2016


Provide at least:

  • jruby-7.1.25 and jruby-
  • macos

Expected Behavior

  • local rubygems repo server.
  • no internet connection
  • gem install nexus fails. jruby- gives an IOError and jruby-1.7.25 an SockerError. the respective code in rubygems looks like
      res = @dns.getresource "_rubygems._tcp.#{host}",
    rescue Resolv::ResolvError
      target =

      if /\.#{Regexp.quote(host)}\z/ =~ target
        return URI.parse "#{uri.scheme}://#{target}#{uri.path}"


where host is localhost and @dns = I am not sure what the idea of the reverse lookup but jruby clearly throws different errors then MRI.

Actual Behavior

  • gem install nexus works on local repository server without further internet

the sonatype nexus server is a caching proxy and can cache rubygems repositories. one feature is that it can serve everything locally cached even with cut internet.

Copy link

@headius headius commented Aug 24, 2016

@etehtsea has improvements and I have a socket branch that may handle this better.

Copy link

@etehtsea etehtsea commented Nov 22, 2016

I have a fix for this issue. Will open PR soon.

UPD: #4329

@enebo enebo closed this in 043ea6f Nov 22, 2016
enebo added a commit that referenced this issue Nov 22, 2016
Add missing PortUnreachable catch. Fixes #4104
@enebo enebo added this to the JRuby milestone Jan 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.