Re: Reliable Messaging With Ruby and DRb

My local IP address is 10.8.8.41. I could not figure out why when I
use 127.0.0.1 the code works but fails when I use my IP address.

At a guess (since you don’t show the server code), I imagine the server
is
bound to IP address 127.0.0.1 - the loopback interface - and therefore
doesn’t accept connections on any other interface.

This is easy to verify:

telnet 127.0.0.1 6438
telnet 10.8.8.41 6438

Do you get a successful connection in the first case, but “connection
refused” in the second case?

If so, all you need to do is configure your server to bind to address
0.0.0.0. This means “all interfaces on the system”

HTH,

Brian.

Reliable Messaging uses DRb::DRbServer to expose the QueueManager.

2007/7/12, Brian C. [email protected]:

My local IP address is 10.8.8.41. I could not figure out why when I
use 127.0.0.1 the code works but fails when I use my IP address.

ACL (access control list) passes to DRbServer by reliable-msg
allows “localhost” only and deny others. So you can access via loopback
address. Also DRb listen address is coded as “localhost”.
These issue is reported here
http://www.ruby-doc.org/stdlib/libdoc/drb/rdoc/index.html
.

Under normal conditions, you can set ACL by a configuration file, e.g.
queues.cfg.
But there is a bug in current gem release (1.1.0), so configurations of
drb
is not reflected.
It was fixed in CVS repository.

You can change the source installed by gem or use source from CVS.

Best Regards,
shino