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:in
to_id’
/usr/local/lib/ruby/1.8/drb/drb.rb:1048:in initialize' /usr/local/lib/ruby/1.8/rinda/rinda.rb:229:in
new’
/usr/local/lib/ruby/1.8/rinda/rinda.rb:229:in take' ./bin/../lib/seldom.rb:134:in
run’
/usr/local/lib/ruby/1.8/webrick/httpservlet/prochandler.rb:26:in
call' /usr/local/lib/ruby/1.8/webrick/httpservlet/prochandler.rb:26:in
do_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:in
service’
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in
run’
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in
start’
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:in
start’
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in each' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in
start’
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:in
start’
./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