History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-1290
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Thomas E Enebo
Reporter: Andy Lo-A-Foe
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
JRuby

DRb fails to bind to socket: Address in use (Errno::EADDRINUSE)

Created: 27/Aug/07 06:54 AM   Updated: 22/Dec/07 06:28 AM
Component/s: None
Affects Version/s: JRuby 1.0.1
Fix Version/s: JRuby 1.1b1, JRuby 1.0.2

Time Tracking:
Not Specified

Environment: Ubuntu 7.04 and Mac OS X 10.4.10, drb


 Description  « Hide
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



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Thomas E Enebo - 01/Sep/07 05:45 PM
For some reason the call to 'new' was happening twice guarantee'ing a ADDRINUSE error. Simple fix but I am not sure how it got like that.

Fixed in commit c4257 on trunk and c4258 on 1.0 branch.