Forum: Ruby DRB not connecting from two diffrent computers

Posted by Prog Rammer (proggrammer)
on 2012-10-01 17:47
Hi I am following:
http://segment7.net/projects/ruby/drb/introduction.html

the first program of manipulating array:
if I run server on a computer in LAN:
then I get it as:
druby://myMachine:54185

but when I run client as on a diffrent computer:
ruby client.rb druby://myMachine:54185

it gives error:
/usr/lib/ruby/1.8/drb/drb.rb:736:in `open': druby://myMachine:54185 -
#<SocketError: getaddrinfo: Name or service not known>
(DRb::DRbConnError)
  from /usr/lib/ruby/1.8/drb/drb.rb:729:in `each'
  from /usr/lib/ruby/1.8/drb/drb.rb:729:in `open'
  from /usr/lib/ruby/1.8/drb/drb.rb:1191:in `initialize'
  from /usr/lib/ruby/1.8/drb/drb.rb:1171:in `new'
  from /usr/lib/ruby/1.8/drb/drb.rb:1171:in `open'
  from /usr/lib/ruby/1.8/drb/drb.rb:1087:in `method_missing'
  from /usr/lib/ruby/1.8/drb/drb.rb:1105:in `with_friend'
  from /usr/lib/ruby/1.8/drb/drb.rb:1086:in `method_missing'

please help!
Posted by "Jesús Gabriel y Galán" <jgabrielygalan@gmail.com> (Guest)
on 2012-10-01 18:11
(Received via mailing list)
On Mon, Oct 1, 2012 at 5:47 PM, ajay paswan <lists@ruby-forum.com> 
wrote:
>
> it gives error:
> /usr/lib/ruby/1.8/drb/drb.rb:736:in `open': druby://myMachine:54185 -
> #<SocketError: getaddrinfo: Name or service not known>
> (DRb::DRbConnError)

Probably that other computer cannot resolve "myMachine". Try using the 
IP.

Jesus.
Posted by Prog Rammer (proggrammer)
on 2012-10-01 18:31
"Jesús Gabriel y Galán" <jgabrielygalan@gmail.com> wrote in post 
#1078192:
> On Mon, Oct 1, 2012 at 5:47 PM, ajay paswan <lists@ruby-forum.com>
> wrote:
>>
>> it gives error:
>> /usr/lib/ruby/1.8/drb/drb.rb:736:in `open': druby://myMachine:54185 -
>> #<SocketError: getaddrinfo: Name or service not known>
>> (DRb::DRbConnError)
>
> Probably that other computer cannot resolve "myMachine". Try using the
> IP.
>
> Jesus.
Thank you very much!!! thats the exact answer!!
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.