Sockets problems on OS X 10.3

Discussion in 'Ruby' started by David Heinemeier Hansson, Jan 15, 2004.

  1. It seems like it wasn't Webrick to fault for my problems getting the
    simple example running, but rather the basic Socket class in Ruby:

    irb(main):002:0> a = Socket.getnameinfo(["AF_INET", '23',
    'www.ruby-lang.org'])
    SocketError: getnameinfo: System error
    from (irb):2:in `getnameinfo'
    from (irb):2

    I'm kinda lost on how to get further from the very generic "System
    error" message. Anyone got a clue on where to find a more fulfilling
    error description for something like this?
    --
    David Heinemeier Hansson.
    http://www.loudthinking.com/ -- Broadcasting Brain
     
    David Heinemeier Hansson, Jan 15, 2004
    #1
    1. Advertising

  2. Well, i found a way to get webrick to work...its to do this before you
    start it up:

    Socket.do_not_reverse_lookup = true

    There is definitely a problem on OS X with getaddrinfo, and perhaps
    getnameinfo...its been reported in several places including...

    http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/84909

    Best,

    Rich

    On Jan 15, 2004, at 2:49 PM, David Heinemeier Hansson wrote:

    > It seems like it wasn't Webrick to fault for my problems getting the
    > simple example running, but rather the basic Socket class in Ruby:
    >
    > irb(main):002:0> a = Socket.getnameinfo(["AF_INET", '23',
    > 'www.ruby-lang.org'])
    > SocketError: getnameinfo: System error
    > from (irb):2:in `getnameinfo'
    > from (irb):2
    >
    > I'm kinda lost on how to get further from the very generic "System
    > error" message. Anyone got a clue on where to find a more fulfilling
    > error description for something like this?
    > --
    > David Heinemeier Hansson.
    > http://www.loudthinking.com/ -- Broadcasting Brain
    >
    >
    >
     
    Richard Kilmer, Jan 15, 2004
    #2
    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. jeff
    Replies:
    0
    Views:
    1,512
  2. Pep
    Replies:
    5
    Views:
    2,300
    E.J. Pitt
    Sep 12, 2005
  3. Nobody

    Re: Problems with sockets

    Nobody, Aug 27, 2009, in forum: C Programming
    Replies:
    3
    Views:
    395
    Sri Harsha Dandibhotla
    Aug 28, 2009
  4. GilNajera

    problems with windows sockets

    GilNajera, Jan 14, 2011, in forum: C Programming
    Replies:
    5
    Views:
    363
    Michael Angelo Ravera
    Jan 18, 2011
  5. Dexter Deejay

    Problems with sockets and threads

    Dexter Deejay, Apr 11, 2013, in forum: Python
    Replies:
    9
    Views:
    141
    Dexter Deejay
    Apr 11, 2013
Loading...

Share This Page