DRb connection closed (nil size)

C

Chris Miller

[Using Ruby 1.8.3 and DRb 2.0.4]

I'm getting odd behavior with DRb. I'm half of
my development machines, we get the following
load error when trying to start our DRb server:

/usr/local/lib/ruby/1.8/drb/drb.rb:567:in `load': connection closed
(DRb::DRbConnError)
from ./../config/../apis/ism/ism_service.rb:36:in `join'
from ./../config/../apis/ism/ism_service.rb:36:in `start'
from ./ism_server.rb:10

The error is stemming from the socket reporting a "nil" size. Here
is the drb.rb code snippet:

561: def load(soc) # :nodoc:
562: begin
563: sz = soc.read(4) # sizeof (N)
564: rescue
565: raise(DRbConnError, $!.message, $!.backtrace)
566: end
567: raise(DRbConnError, 'connection closed') if sz.nil?

Here's the server code snippet, where we try to start:
20: def start()
21: puts("Starting ISM Service...")
22: if @worker == nil
23: _trap_signals()
24:
25: @queue = ReliableMsg::Queue.new(ISM_QUEUE)
26:
27: @interrupted = false
28:
29: @worker = Thread.new {
30: puts("ISM Service started!")
31: while !@interrupted do
32: _get_message()
33: sleep(2)
34: end
35: }
36: @worker.join


Note that we've done a series of DRb tests with small
clients/servers and it seems to be functioning normally
otherwise.

Again, it works on some machines, but not others, having
identical code stacks (although the OS's differ). Has anyone
seen this behaviour before? Any help on how to proceed and
debug would be much appreciated....

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,196
Latest member
TopCryptoTxSoftwares2024

Latest Threads

Top