From: Brian Candler Date: 2007-04-15T22:15:19+09:00 Subject: Re: having a problem with DRb On Sun, Apr 15, 2007 at 02:54:45PM +0900, Raj Sahae wrote: > It won't connect. I tried it with a friend 400 miles away, and I tried > it on 2 comps here on my home network. I get a DRbConnError no matter > what variation I try. Firewall off/on, port forwarding and port > triggering off/on. The server and client snippets of relevance are below. You've missed out the most important bit, which is a description of your home network *and* your friend's network. If both are on private IP addresses, and both have NAT firewalls between them and the Internet, then unless you've set up a VPN linking the two networks then it's not going to be straightforward to implement, because DRb involves calls in both directions. There are some details about how DRb works at http://wiki.rubygarden.org/Ruby/page/show/DRbTutorial > #SERVER > > $uri = "druby://localhost:7824" That is never going to work between hosts, because you've explicitly told the server to listen on interface 127.0.0.1 (the loopback), which means that only other processes on the same host will be able to connect to it. You could try: $uri = "druby://myhostname.example.com:7824" That may work but only if both machines are *directly* connected to the Internet with a public IP address (e.g. it's a Windows machine with a USB-ADSL modem or a dial-up) *and* both machines have a real hostname, as the hostname is used by one machine to contact the other. If not, then you will have to do lots of frigs involving port forwarding *and* name to IP mapping. It would be easier to set up an ssh tunnel between the two machines, and run DRb over that, since only one piece of port-forwarding would be neeed. Regards, Brian.