JRuby

JRuby DRb client cannot connect to MRI DRb server

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Not A Bug
  • Affects Version/s: JRuby 1.2
  • Fix Version/s: None
  • Component/s: Core Classes/Modules
  • Labels:
    None
  • Environment:
    Mac OS X 10.5.5, ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0], jruby 1.1.7 (ruby 1.8.6 patchlevel 114) (2008-12-14 rev 8329) [i386-java]
  • Number of attachments :
    2

Description

Although it is possible to connect to a JRuby DRb server from either a JRuby or MRI client, connections to MRI DRb servers fail from JRuby clients with ECONNREFUSED:

/usr/local/src/jruby/trunk/lib/ruby/1.8/drb/drb.rb:736:in `open': druby://localhost:9000 - #<Errno::ECONNREFUSED: Connection refused - Connection refused> (DRb::DRbConnError)

Client and server code attached.

  1. drb_client.rb
    28/Dec/08 12:37 PM
    0.1 kB
    Riley Lynch
  2. drb_server.rb
    28/Dec/08 12:37 PM
    0.2 kB
    Riley Lynch

Activity

Hide
Riley Lynch added a comment -

This problem may be limited to Mac OS X: It does not affect Ubuntu 10 (ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]).

Show
Riley Lynch added a comment - This problem may be limited to Mac OS X: It does not affect Ubuntu 10 (ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]).
Hide
Riley Lynch added a comment -

This problem may be particular to Mac OS X MRI, or to the 1.8.6p114. I can't replicate it with an MRI server on Ubuntu (1.8.7p72) and a JRuby client on OS X.

Show
Riley Lynch added a comment - This problem may be particular to Mac OS X MRI, or to the 1.8.6p114. I can't replicate it with an MRI server on Ubuntu (1.8.7p72) and a JRuby client on OS X.
Hide
Riley Lynch added a comment -

This problem seems to be local to MRI 1.8.6p114 on OS X. I was able to connect to a server running 1.8.7p72 on OS X and a server running 1.8.6p114 on Ubuntu without issues. I'm marking the bug resolved since it appears to be limited to an incompatibility with an older version of MRI on one platform.

Show
Riley Lynch added a comment - This problem seems to be local to MRI 1.8.6p114 on OS X. I was able to connect to a server running 1.8.7p72 on OS X and a server running 1.8.6p114 on Ubuntu without issues. I'm marking the bug resolved since it appears to be limited to an incompatibility with an older version of MRI on one platform.
Hide
Riley Lynch added a comment -

My error: The issue seems to apply to all versions of MRI on Mac OS X. Reopening.

Show
Riley Lynch added a comment - My error: The issue seems to apply to all versions of MRI on Mac OS X. Reopening.
Hide
Riley Lynch added a comment -

Double-checked. Problem seems to exist on OS X 10.5.5 (JRuby 1.1.7, MRI 1.8.6p114 and 1.8.7p72) and OS X 10.5.4 (JRuby 1.1.6RC1, MRI 1.8.6p1111 and 1.8.6p114).

Show
Riley Lynch added a comment - Double-checked. Problem seems to exist on OS X 10.5.5 (JRuby 1.1.7, MRI 1.8.6p114 and 1.8.7p72) and OS X 10.5.4 (JRuby 1.1.6RC1, MRI 1.8.6p1111 and 1.8.6p114).
Hide
Charles Oliver Nutter added a comment -

Riley: I would wager this is an IPv4 versus IPv6 difference. In JRuby's case I believe it is resolving localhost to the IPv6 address, where MRI always uses the IPv4 address. If I use 0.0.0.0 for both, it works correctly. I'm marking this "not a bug"...if you feel like the host resolution thing is a real problem (which it certainly may be), please file another bug for it.

Show
Charles Oliver Nutter added a comment - Riley: I would wager this is an IPv4 versus IPv6 difference. In JRuby's case I believe it is resolving localhost to the IPv6 address, where MRI always uses the IPv4 address. If I use 0.0.0.0 for both, it works correctly. I'm marking this "not a bug"...if you feel like the host resolution thing is a real problem (which it certainly may be), please file another bug for it.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: