From: Richard Kilmer Date: 2003-12-27T11:55:38+09:00 Subject: Re: Error with Socket.getaddrinfo on OS X On Dec 26, 2003, at 9:52 PM, Richard Kilmer wrote: > > On Dec 26, 2003, at 6:17 PM, Richard Kilmer wrote: > >> irb(main):002:0> Socket::getaddrinfo('192.168.1.100', 8081, >> Socket::AF_UNSPEC, Socket::SOCK_STREAM, 0, Socket::AI_PASSIVE) >> SocketError: getnameinfo: nodename nor servname provided, or not known >> from (irb):2:in `getaddrinfo' >> from (irb):2 >> > > Same problem posted in RubyTalk # 84909 > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/84909 > > Darn, I wish I/we would have caught this before 1.8.1...this really > creates problems on OS X w/networking libraries. > Found this quote: MacOS X Panther has a lousy getnameinfo() implementation that doesn't fill the buffer when no DNS entry is found for a host and a numerical result wasn't explicitely asked. As a result, Pure-FTPd didn't even start on Panther (saying "bad IP address") . We now check for EAI_NONAME if available and we retry with NI_NUMERICHOST if this is what getnameinfo() returns. Thanks to Yann Bizeul for his valuable help on this issue. Will research it more and see if I can come up with a patch (I am NOT good at C!)