JRuby 1.0.1 fails to bind to socket when using DRb. The response is always "Address in use (Errno::EADDRINUSE)" even though the port is free.
This behaviour was duplicated on both Ubuntu Linux 7.04 and Mac OS X 10.4.10, both with the binary JRuby 1.0.1 tarball. Trace of a call:
/Developer/Java/jruby-1.0.1/lib/ruby/1.8/drb/drb.rb:865:in `open': Address in use (Errno::EADDRINUSE)
from /Developer/Java/jruby-1.0.1/lib/ruby/1.8/drb/drb.rb:865:in `open_server'
from /Developer/Java/jruby-1.0.1/lib/ruby/1.8/drb/drb.rb:759:in `open_server'
from /Developer/Java/jruby-1.0.1/lib/ruby/1.8/drb/drb.rb:1339:in `each'
from /Developer/Java/jruby-1.0.1/lib/ruby/1.8/drb/drb.rb:757:in `open_server'
from /Developer/Java/jruby-1.0.1/lib/ruby/1.8/drb/drb.rb:1339:in `initialize'
from /Developer/Java/jruby-1.0.1/lib/ruby/1.8/drb/drb.rb:1627:in `new'
from /Developer/Java/jruby-1.0.1/lib/ruby/1.8/drb/drb.rb:1627:in `start_service'
from jruby_server.rb:49
Where the last line looks like:
DRb.start_service 'druby://127.0.0.1:4999', StateServer.new
(i.e. no matter which port is chosen the result is always the same). The exact same code works fine with JRuby 1.0.0
Fixed in commit c4257 on trunk and c4258 on 1.0 branch.