K
Kevin Brown
This is not a DRb problem, so much as a system configuration problem. I know
this already, but I can't figure out why DRb will not connect. I have two
machines, plugged into a switch, and both have static IPs. I have had DRb
talking just fine before, but only for a while, so I'm not sure why it won't
talk now, and I thought I had already solved the problem by placing the
whatever.fylz.com before localhost.localdomain in the /etc/hosts files. I
have not rebooted either machine (but it was overnight), so I do not know now
why they DRb will not talk.
The problem seems to be name resolution, so I'm playing around with /etc/hosts
to see if I can get us to talk.
I'm using the dchats.rb and dchatc.rb included with the DRb examples. I start
the server on one machine (called costarica) and see this:
kevin@costarica:~/drbsample$ ruby dchats.rb
druby://costarica.fylz.com:1242
[return] to exit.
I start the client on the other machine (called nicaragua) and see this:
kevin@nicaragua:~/ruby/drb$ ruby dchatc.rb druby://costarica.fylz.com:1242
kevin
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:733:in `open':
druby://nicaragua.fylz.com:39879 - #<Errno::ECONNREFUSED: Connection refused
- connect(2)> (DRb:RbConnError)
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:726:in `each'
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:726:in `open'
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:1185:in
`initialize'
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:1165:in `new'
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:1165:in `open'
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:1082:in
`method_missing'
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:1081:in
`with_friend'
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:1081:in
`method_missing'
from (druby://costarica.fylz.com:1242) dchats.rb:14:in `initialize'
from (druby://costarica.fylz.com:1242) dchats.rb:37:in `new'
from (druby://costarica.fylz.com:1242) dchats.rb:37:in `add_member'
from dchatc.rb:37
I can ping both machines by name from each other just fine:
kevin@nicaragua:~/ruby/drb$ ping costarica
PING costarica.fylz.com (192.168.2.105) 56(84) bytes of data.
64 bytes from costarica.fylz.com (192.168.2.105): icmp_seq=1 ttl=64 time=0.226
ms
kevin@costarica:~/drbsample$ ping nicaragua
PING nicaragua.fylz.com (192.168.2.102) 56(84) bytes of data.
64 bytes from nicaragua.fylz.com (192.168.2.102): icmp_seq=1 ttl=64 time=0.206
ms
Both know their host name:
kevin@nicaragua:~/ruby/drb$ hostname
nicaragua.fylz.com
kevin@costarica:~/drbsample$ hostname
costarica.fylz.com
And here are the contents of both of their /etc/hosts files:
kevin@nicaragua:~/ruby/drb$ cat /etc/hosts
127.0.0.1 nicaragua.fylz.com localhost.localdomain localhost
nicaragua
198.186.207.1 router
198.186.207.11 myradio
198.186.207.2 fylradio
192.168.0.1 vsat
192.168.2.103 dualie
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
192.168.2.105 costarica.fylz.com costarica
192.168.2.102 nicaragua.fylz.com nicaragua
kevin@costarica:~/drbsample$ cat /etc/hosts
127.0.0.1 costarica.fylz.com localhost.localdomain localhost
costarica
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
192.168.2.105 costarica.fylz.com costarica
192.168.2.102 nicaragua.fylz.com nicaragua
The server (costarica) is running Debian Sarge and the client is on Kubuntu
Hoary. Does anyone have any idea why I see the above error? I certainly
don't.
this already, but I can't figure out why DRb will not connect. I have two
machines, plugged into a switch, and both have static IPs. I have had DRb
talking just fine before, but only for a while, so I'm not sure why it won't
talk now, and I thought I had already solved the problem by placing the
whatever.fylz.com before localhost.localdomain in the /etc/hosts files. I
have not rebooted either machine (but it was overnight), so I do not know now
why they DRb will not talk.
The problem seems to be name resolution, so I'm playing around with /etc/hosts
to see if I can get us to talk.
I'm using the dchats.rb and dchatc.rb included with the DRb examples. I start
the server on one machine (called costarica) and see this:
kevin@costarica:~/drbsample$ ruby dchats.rb
druby://costarica.fylz.com:1242
[return] to exit.
I start the client on the other machine (called nicaragua) and see this:
kevin@nicaragua:~/ruby/drb$ ruby dchatc.rb druby://costarica.fylz.com:1242
kevin
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:733:in `open':
druby://nicaragua.fylz.com:39879 - #<Errno::ECONNREFUSED: Connection refused
- connect(2)> (DRb:RbConnError)
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:726:in `each'
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:726:in `open'
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:1185:in
`initialize'
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:1165:in `new'
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:1165:in `open'
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:1082:in
`method_missing'
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:1081:in
`with_friend'
from
(druby://costarica.fylz.com:1242) /usr/lib/ruby/1.8/drb/drb.rb:1081:in
`method_missing'
from (druby://costarica.fylz.com:1242) dchats.rb:14:in `initialize'
from (druby://costarica.fylz.com:1242) dchats.rb:37:in `new'
from (druby://costarica.fylz.com:1242) dchats.rb:37:in `add_member'
from dchatc.rb:37
I can ping both machines by name from each other just fine:
kevin@nicaragua:~/ruby/drb$ ping costarica
PING costarica.fylz.com (192.168.2.105) 56(84) bytes of data.
64 bytes from costarica.fylz.com (192.168.2.105): icmp_seq=1 ttl=64 time=0.226
ms
kevin@costarica:~/drbsample$ ping nicaragua
PING nicaragua.fylz.com (192.168.2.102) 56(84) bytes of data.
64 bytes from nicaragua.fylz.com (192.168.2.102): icmp_seq=1 ttl=64 time=0.206
ms
Both know their host name:
kevin@nicaragua:~/ruby/drb$ hostname
nicaragua.fylz.com
kevin@costarica:~/drbsample$ hostname
costarica.fylz.com
And here are the contents of both of their /etc/hosts files:
kevin@nicaragua:~/ruby/drb$ cat /etc/hosts
127.0.0.1 nicaragua.fylz.com localhost.localdomain localhost
nicaragua
198.186.207.1 router
198.186.207.11 myradio
198.186.207.2 fylradio
192.168.0.1 vsat
192.168.2.103 dualie
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
192.168.2.105 costarica.fylz.com costarica
192.168.2.102 nicaragua.fylz.com nicaragua
kevin@costarica:~/drbsample$ cat /etc/hosts
127.0.0.1 costarica.fylz.com localhost.localdomain localhost
costarica
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
192.168.2.105 costarica.fylz.com costarica
192.168.2.102 nicaragua.fylz.com nicaragua
The server (costarica) is running Debian Sarge and the client is on Kubuntu
Hoary. Does anyone have any idea why I see the above error? I certainly
don't.