SocketError: getnameinfo: ai_family not supported.

Discussion in 'Ruby' started by Bradley, Todd, Nov 16, 2004.

  1. 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 192.168.69.50. 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 = TCPSocket.new('192.168.69.50', '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(8)
    SocketError: getnameinfo: ai_family not supported.
    from (irb):10:in `recvfrom'
    from (irb):10
    irb(main):011:0>

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

    For instance,
    http://blade.nagaokaut.ac.jp/cgi-bin/rcat.rb/ruby/ruby-talk/47887
    says the following:


    ----clip----
    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!!
    ----clip----


    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?


    Todd.
    Bradley, Todd, Nov 16, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. NEETU GARG
    Replies:
    1
    Views:
    693
    Simon Peacock
    Apr 10, 2004
  2. Mariano

    Using getnameinfo()

    Mariano, Jun 30, 2008, in forum: C Programming
    Replies:
    3
    Views:
    805
  3. A. S. Bradbury
    Replies:
    5
    Views:
    294
    Eric Hodel
    Sep 8, 2006
  4. Baq Haidri
    Replies:
    4
    Views:
    318
    Baq Haidri
    May 7, 2008
  5. Walle Wallen

    Pingecho, causing SocketError.

    Walle Wallen, Aug 2, 2010, in forum: Ruby
    Replies:
    3
    Views:
    125
    Walle Wallen
    Aug 2, 2010
Loading...

Share This Page