# Rinda not working through the network - what's wrong?

**URL:** <https://www.ruby-forum.com/t/rinda-not-working-through-the-network-whats-wrong/80177>\
**Category:** Ruby\
**Created:** [March 13, 2006, 12:51am UTC](https://www.ruby-forum.com/t/rinda-not-working-through-the-network-whats-wrong/80177 "2006-03-13T00:51:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pau\_Garcia\_i\_Quiles](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@Pau\_Garcia\_i\_Quiles](https://www.ruby-forum.com/u/Pau_Garcia_i_Quiles)\
**Post date:** [March 13, 2006, 12:51am UTC](https://www.ruby-forum.com/t/rinda-not-working-through-the-network-whats-wrong/80177/1 "2006-03-13T00:51:40Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hello,

I have host A (IP 192.168.1.3) and host B (IP 192.168.1.5), both of them  
Linux  
(KUbuntu 5.10) with no firewall. I am running ruby 1.8.4, installed from  
KUbuntu packages.

If I run ringserver.rb, server.rb and client.rb in the same host, it  
works  
fine. (Source code is at the end of the message)

But if I go for the interesting case, i. e. running ringserver.rb (taken  
straight from [segment7.net](http://segment7.net)) and server.rb in host A and client.rb in  
host B,  
it fails with a RingNotFound exception.

What am I doing wrong? Should I specify a port for Rinda? (I think the  
broadcast list should be enough)

=== ringserver.rb ===  
#!/usr/bin/env ruby -w

# 

# Start this one first.

# 

# ringserver.rb

# Rinda RingServer

require ‘rinda/ring’  
require ‘rinda/tuplespace’

# start DRb

DRb.start\_service

# Create a TupleSpace to hold named services, and start running

Rinda::RingServer.new Rinda::TupleSpace.new

# Wait until the user explicitly kills the server.

# DRb.thread.join

=== server.rb ===  
#!/usr/bin/env ruby -w

# 

require ‘drb’  
require ‘rinda/ring’

class TestServer  
include DRbUndumped  
def add(\*args)  
args.inject{ |n,v| n + v }  
end  
end

server = TestServer.new  
DRb.start\_service(‘druby://:9000’, server)

provider = Rinda::RingProvider.new :TestServer, server, “Test Server”  
provider.provide

DRb.thread.join

==============

=== client.rb ===  
#!/usr/bin/env ruby -w

# 

require ‘drb’  
require ‘rinda/ring’

DRb.start\_service()

ringfinger = Rinda::RingFinger.new([‘192.168.1.3’,‘192.168.1.5’])  
@ringserver = ringfinger.lookup\_ring\_any()

obj\_tuple = @ringserver.take([:name, nil, nil, nil])  
obj = obj\_tuple[2]

# puts “Sum is: #{obj.add(1,2,3,4)}”

Thank you.

* * *

Pau Garcia i Quiles  
[http://www.elpauer.org](http://www.elpauer.org)  
(Due to the amount of work, I usually need 10 days to answer)  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFEFLOB/DzYv9iGJzsRAjdgAJ48uL8URkW33PFZ9s7UrLLNmz3EiwCg1hrk  
whtbE+nK9+q/Zxz33GtRdvw=  
=m1YQ  
-----END PGP SIGNATURE-----
