DRb "premature header" error on JRuby client
--------------------------------------------
Key: JRUBY-3017
URL: http://jira.codehaus.org/browse/JRUBY-3017
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1.4
Environment: Mac 10.5.4
Java 5 & 6
JRuby 1.0.3 & 1.1.4
MRI 1.8.6
Reporter: Dave Hoover
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....
{code}
(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
{code}
When I run the server in anything other than JRuby 1.1.4, everything works
great. Here is the code.
{code:title=server.rb|borderStyle=solid}
require 'drb'
class Server
def hello(*args)
p args
"success"
end
end
DRb.start_service('druby://localhost:9000', Server.new)
DRb.thread.join
{code}
{code:title=client.rb|borderStyle=solid}
require 'drb'
obj = DRbObject.new(nil, 'druby://localhost:9000')
200.times { puts obj.hello({:foo => "bar"}) }
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email