DRbServerNotFound on TupleSpace#take but not read


#1

I’m getting a DRbServerNotFound exception on TupleSpace#take but not
TupleSpace#read. I’m running ruby 1.8.5 on fedora core 6.

Here’s a little snippet:

@http_server.mount_proc(’/delete’) do |req, res|
id = req.path_info.reverse.chop.reverse
@seldom_space.read([‘pending’, nil, id, nil], 2)
@seldom_space.take([‘pending’, nil, id, nil], 2)
res.body = get_status
end

Basically @seldom_space is a TupleSpaceProxy that I’m accessing from
within
a Webrick proc servlet. The read will work as expected and return a
‘pending’ tuple with the specified id. The take is throwing the
following
exception:

[2007-03-15 11:06:13] ERROR DRb::DRbServerNotFound:
DRb::DRbServerNotFound
/usr/local/lib/ruby/1.8/drb/drb.rb:1650:in current_server' /usr/local/lib/ruby/1.8/drb/drb.rb:1712:into_id’
/usr/local/lib/ruby/1.8/drb/drb.rb:1048:in initialize' /usr/local/lib/ruby/1.8/rinda/rinda.rb:229:innew’
/usr/local/lib/ruby/1.8/rinda/rinda.rb:229:in take' ./bin/../lib/seldom.rb:134:inrun’
/usr/local/lib/ruby/1.8/webrick/httpservlet/prochandler.rb:26:in
call' /usr/local/lib/ruby/1.8/webrick/httpservlet/prochandler.rb:26:indo_GET’
/usr/local/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in
__send__' /usr/local/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:inservice’
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:inrun’
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:instart’
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:instart’
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in each' /usr/local/lib/ruby/1.8/webrick/server.rb:92:instart’
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:instart’
./bin/…/lib/seldom.rb:138:in `run’
bin/seldom:31

Anyone have an idea what’s going on? I’ve been stepping through DRb
with
ruby-debug for hours and I’m not able to wrap my mind around what’s
happening (though I have learned a lot about more about DRb).

–Brenton