# More DRb Fun

**URL:** <https://www.ruby-forum.com/t/more-drb-fun/95232>\
**Category:** Ruby\
**Created:** [January 15, 2006, 8:36am UTC](https://www.ruby-forum.com/t/more-drb-fun/95232 "2006-01-15T08:36:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/90ced4/32.png) [@kevben](https://www.ruby-forum.com/u/kevben)\
**Post date:** [January 15, 2006, 8:36am UTC](https://www.ruby-forum.com/t/more-drb-fun/95232/1 "2006-01-15T08:36:23Z")

</div>

I’m not sure why I’m having so much fun with DRb, really:

kevin@itzamna:~/drb$ ./server.rb  
/usr/lib/ruby/1.8/drb/drb.rb:837:in `getaddrinfo': getaddrinfo: Name or service not known (SocketError) from /usr/lib/ruby/1.8/drb/drb.rb:837:in`open\_server\_inaddr\_any’  
from /usr/lib/ruby/1.8/drb/drb.rb:860:in `open_server' from /usr/lib/ruby/1.8/drb/drb.rb:756:in`open\_server’  
from /usr/lib/ruby/1.8/drb/drb.rb:754:in `each' from /usr/lib/ruby/1.8/drb/drb.rb:754:in`open\_server’  
from /usr/lib/ruby/1.8/drb/drb.rb:1335:in `initialize' from /usr/lib/ruby/1.8/drb/drb.rb:1624:in`new’  
from /usr/lib/ruby/1.8/drb/drb.rb:1624:in `start\_service’  
from ./server.rb:9  
kevin@itzamna:~/drb$ cat server.rb  
#!/usr/bin/env ruby

# simple\_service.rb

# A simple DRb service

# load DRb

require ‘drb’

# start up the DRb service

DRb.start\_service nil, []

# We need the uri of the service to connect a client

puts DRb.uri

# wait for the DRb service to finish before exiting

DRb.thread.join

This is on a fresh install of Debian Sarge, and I’m pretty sure I’ve  
grabbed all the Debian Ruby portions off of apt-get…

Any ideas why I’m having this trouble?

---

<div class="post-metadata">

**Author:** ![kevben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/90ced4/32.png) [@kevben](https://www.ruby-forum.com/u/kevben)\
**Post date:** [January 17, 2006, 1:45pm UTC](https://www.ruby-forum.com/t/more-drb-fun/95232/2 "2006-01-17T13:45:28Z")

</div>

Here I go solving my own problems again.

The thing that threw me was the error message. Turns out the problem  
was that the wrong hostname was in the top line of /etc/hosts, so the  
host name of the machine wasn’t mapping to 127.0.0.1.
