Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.1.4
-
Fix Version/s: JRuby 1.2
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:Mac 10.5.4
Java 5 & 6
JRuby 1.0.3 & 1.1.4
MRI 1.8.6
Description
When I run a DRb server with JRuby 1.1.4 and a DRb client in either JRuby 1.1.4, JRuby 1.0.3, or MRI 1.8.6, I get the following error about half the time....
(druby://localhost:9000) /Users/redsquirrel/Projects/jruby-1.1.4/lib/ruby/1.8/drb/drb.rb:571:in `load': premature header (DRb::DRbConnError) from (druby://localhost:9000) /Users/redsquirrel/Projects/jruby-1.1.4/lib/ruby/1.8/drb/drb.rb:612:in `recv_request' from (druby://localhost:9000) /Users/redsquirrel/Projects/jruby-1.1.4/lib/ruby/1.8/drb/drb.rb:912:in `recv_request' from (druby://localhost:9000) /Users/redsquirrel/Projects/jruby-1.1.4/lib/ruby/1.8/drb/drb.rb:1523:in `init_with_client' from (druby://localhost:9000) /Users/redsquirrel/Projects/jruby-1.1.4/lib/ruby/1.8/drb/drb.rb:1535:in `setup_message' from (druby://localhost:9000) /Users/redsquirrel/Projects/jruby-1.1.4/lib/ruby/1.8/drb/drb.rb:1487:in `perform' from (druby://localhost:9000) /Users/redsquirrel/Projects/jruby-1.1.4/lib/ruby/1.8/drb/drb.rb:1582:in `main_loop' from (druby://localhost:9000) :1:in `accept' from :1
When I run the server in anything other than JRuby 1.1.4, everything works great. Here is the code.
server.rb
require 'drb'
class Server
def hello(*args)
p args
"success"
end
end
DRb.start_service('druby://localhost:9000', Server.new)
DRb.thread.join
client.rb
require 'drb' obj = DRbObject.new(nil, 'druby://localhost:9000') 200.times { puts obj.hello({:foo => "bar"}) }
Thanks for the simple examples. I think this has been reported before, but I haven't searched bugs. At any rate, it would be nice to squash this one finally.