Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > SocketError: getnameinfo: ai_family not supported.

Thread Tools

SocketError: getnameinfo: ai_family not supported.

Bradley, Todd
Posts: n/a
I'm writing a little Ruby network client and having problems
with an error of "ai_family not supported". I've got a Java
program running on my SuSE machine at It listens
on port 2020 and tries to talk to my client, which is running
on Ruby 1.8.2 on my Windows XP machine.

Here's the irb session that shows what's happening to me.

irb(main):001:0> #
irb(main):002:0* # This demonstrates how I can't get Ruby on Windows
irb(main):003:0* # to talk to my socket program on SuSE
irb(main):004:0* #
irb(main):005:0* require 'socket'
=> true
irb(main):006:0> t ='', '2020')
=> #<TCPSocket:0x28b8ad0>
irb(main):007:0> #
irb(main):008:0* # Socket connection is now up
irb(main):009:0* #
irb(main):010:0* data = t.recvfrom(
SocketError: getnameinfo: ai_family not supported.
from (irb):10:in `recvfrom'
from (irb):10

I did some Googling and found some references to people getting this
error message over 2 years ago. But nothing more recent.

For instance,
says the following:

According to the "Ruby Developer's Guide", page 337, the fix
for this is to recompile Ruby with
/configure --enable-ipv6 --with-lookup-order-hack=INET.
I tried that and it didn't work!!

Is there anything I can do to get around this short of building
Ruby from source with these options? (that's something I don't
look forward to, since I dread building anything from source on
Windows) And even if I did that, would it really fix the problem?
Any advice?


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why not 'foo = not f' instead of 'foo = (not f or 1) and 0'? Kristian Domke Python 11 01-23-2008 07:27 PM
'' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long. rote ASP .Net 2 01-23-2008 03:07 PM
getnameinfo: ai_family not supported (SocketError) A. S. Bradbury Ruby 5 09-08-2006 06:22 PM
Cisco 3640 3620 3600 not detecting, not enabling, not working: NM-2FE2W Taki Soho Cisco 0 09-22-2004 07:28 AM
maintaining control with cookies (not strictly an ASP or even server side question. But not not either) Stephanie Stowe ASP General 2 04-07-2004 04:23 PM