[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

More DRb Fun

Kevin Brown

1/15/2006 7:36:00 AM

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?


2 Answers

Konstantin Levinski

1/17/2006 12:01:00 AM

0

My guess would be -

-DRb.start_service nil, []
+DRb.start_service "druby://0.0.0.0:10001", []

so that druby knows which port to use.

Kevin Brown

1/17/2006 12:07:00 PM

0

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.

On 1/14/06, Kevin Brown <blargity@gmail.com> wrote:
> 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?
>