From: Laurent Sansonetti Date: 2008-05-29T15:00:54+09:00 Subject: Re: DRb Problems with Mac OS X 10.5.3 Thanks for the report, we are of course very sorry about that. Ruby didn't change in Mac OS X 10.5.3, so we are currently investigating possible regressions in the underlying frameworks. We will let you know. Following Andy's idea, what about the following as a temporary fix? Seems to work for DRb servers with a port of 0 (which seems to be the default). Apparently DRb servers which explicitly bind to a non 0 port are not affected by this regression. class DRb::DRbTCPSocket class << self alias parse_uri_orig parse_uri def parse_uri(*args) ary = parse_uri_orig(*args) ary[1] = nil if ary[1] == 0 ary end end end Laurent On Wed, May 28, 2008 at 10:11 PM, Andy Keep wrote: > I've not done too much Ruby socket programming, but it seems to be that > it doesn't like 0 as a service number, because it is interpreting it as > the real service 0, instead of the empty service... if you use nil > instead it works fine... you might be able to patch dRb to use that as a > work around. > > > irb(main):001:0> require 'socket' > => true > irb(main):011:0> Socket.getaddrinfo(Socket.gethostname, 0, > Socket::AF_INET, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME) > SocketError: getaddrinfo: nodename nor servname provided, or not known > from (irb):11:in `getaddrinfo' > from (irb):11 > from :0 > irb(main):012:0> Socket.getaddrinfo(Socket.gethostname, nil, > Socket::AF_INET, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME) > => [["AF_INET", 0, "192.168.1.95", "192.168.1.95", 2, 1, 6]] > > > Kurt Schrader wrote: >> No solution yet, but it looks like something has changed in some >> underlying networking library, as base socket handing methods seem to be >> broken: >> >> [kschrader@einstein:~]$ irb >>>> require 'socket' >> => true >>>> Socket.getaddrinfo(Socket.gethostname, 0, Socket::AF_INET, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME) >> SocketError: getaddrinfo: nodename nor servname provided, or not known >> from (irb):2:in `getaddrinfo' >> from (irb):2 >>>> >> >> >> Eric Ly wrote: >>> I'm running into the same problem too having just upgraded. Is there a >>> solution? >>> >>> >>> Eric >>> >>> Kurt Schrader wrote: >>>> It looks like the Mac OS X 10.5.3 upgrade breaks DRb when it's trying to >>>> open a TCPSocket. >>>> >>>> Looking into it now, but be warned: >>>> >>>> /opt/local/lib/ruby/1.8/drb/drb.rb:865:in `initialize': getaddrinfo: >>>> nodename nor servname provided, or not known (SocketError) >>>> from /opt/local/lib/ruby/1.8/drb/drb.rb:865:in `open' >>>> from /opt/local/lib/ruby/1.8/drb/drb.rb:865:in `open_server' >>>> >>>> -Kurt > > -- > Posted via http://www.ruby-forum.com/. > >