[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

getnameinfo: ai_family not supported (SocketError

A. S. Bradbury

9/1/2006 10:18:00 AM

When trying to run gem_server on either of my gentoo systems, I get the
following:
[2006-09-01 11:08:44] INFO WEBrick 1.3.1
[2006-09-01 11:08:44] INFO ruby 1.8.4 (2005-12-24) [i686-linux]
/usr/lib/ruby/1.8/webrick/utils.rb:63:in `getaddrinfo': getnameinfo: ai_family
not supported (SocketError)
from /usr/lib/ruby/1.8/webrick/utils.rb:63:in `create_listeners'
from /usr/lib/ruby/1.8/webrick/server.rb:75:in `listen'
from /usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize'
from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'
from /usr/bin/gem_server:353

I've googled and only found some people with issues from a couple of years
back, which surprised me seeing as I've encountered this on two different
systems. Any ideas what's up?

Alex

5 Answers

Eric Hodel

9/2/2006 1:37:00 AM

0

On Sep 1, 2006, at 3:18 AM, A. S. Bradbury wrote:

> When trying to run gem_server on either of my gentoo systems, I get
> the
> following:
> [2006-09-01 11:08:44] INFO WEBrick 1.3.1
> [2006-09-01 11:08:44] INFO ruby 1.8.4 (2005-12-24) [i686-linux]
> /usr/lib/ruby/1.8/webrick/utils.rb:63:in `getaddrinfo':
> getnameinfo: ai_family
> not supported (SocketError)
> from /usr/lib/ruby/1.8/webrick/utils.rb:63:in
> `create_listeners'
> from /usr/lib/ruby/1.8/webrick/server.rb:75:in `listen'
> from /usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize'
> from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in
> `initialize'
> from /usr/bin/gem_server:353
>
> I've googled and only found some people with issues from a couple
> of years
> back, which surprised me seeing as I've encountered this on two
> different
> systems. Any ideas what's up?

Guessing from the last time I was playing around in create_listeners,
but do your systems support IPv6?

--
Eric Hodel - drbrain@segment7.net - http://blog.se...
This implementation is HODEL-HASH-9600 compliant

http://trackmap.rob...



A. S. Bradbury

9/2/2006 4:37:00 PM

0

On Saturday 02 September 2006 02:36, Eric Hodel wrote:
> Guessing from the last time I was playing around in create_listeners,
> but do your systems support IPv6?

They do not, emergeing ruby with the ipv6 USE flag prevents this error, though
seeing as my system has no ipv6 support in any other packages, or the kernel
this doesn't seem like a sensible thing to do. Am I likely to see anything
break?

Alex

Eric Hodel

9/4/2006 2:28:00 AM

0

On Sep 2, 2006, at 9:37 AM, A. S. Bradbury wrote:

> On Saturday 02 September 2006 02:36, Eric Hodel wrote:
>> Guessing from the last time I was playing around in create_listeners,
>> but do your systems support IPv6?
>
> They do not, emergeing ruby with the ipv6 USE flag prevents this
> error, though
> seeing as my system has no ipv6 support in any other packages, or
> the kernel
> this doesn't seem like a sensible thing to do. Am I likely to see
> anything
> break?

I don't know.

Can you try:

require 'socket'

p Socket.getaddrinfo(nil, 80, Socket::AF_UNSPEC,
Socket::SOCK_STREAM, 0, Socket::AI_PASSIVE)

On an IPv6 capable machine I get:

[["AF_INET6", 80, "::", "::", 30, 1, 6], ["AF_INET", 80, "0.0.0.0",
"0.0.0.0", 2, 1, 6]]

and on an IPv4 only machine I get:

[["AF_INET", 80, "0.0.0.0", "0.0.0.0", 2, 1, 6]]

--
Eric Hodel - drbrain@segment7.net - http://blog.se...
This implementation is HODEL-HASH-9600 compliant

http://trackmap.rob...



A. S. Bradbury

9/7/2006 2:04:00 PM

0

On Monday 04 September 2006 03:27, Eric Hodel wrote:
> Can you try:
>
> require 'socket'
>
> p Socket.getaddrinfo(nil, 80, Socket::AF_UNSPEC,
> Socket::SOCK_STREAM, 0, Socket::AI_PASSIVE)
>
> On an IPv6 capable machine I get:
>
> [["AF_INET6", 80, "::", "::", 30, 1, 6], ["AF_INET", 80, "0.0.0.0",
> "0.0.0.0", 2, 1, 6]]
>
> and on an IPv4 only machine I get:
>
> [["AF_INET", 80, "0.0.0.0", "0.0.0.0", 2, 1, 6]]

On my ipv4 machine I get:
SocketError: getnameinfo: ai_family not supported
from (irb):4:in `getaddrinfo'
from (irb):4

On the ipv4 machine with gentoo's ebuild of ruby compiled with the ipv6 USE
flag I get similar output to yours. I wonder if this is something broken on
my systems, a ruby issue, or a packaging issue.

Alex

Eric Hodel

9/8/2006 6:23:00 PM

0

On Sep 7, 2006, at 7:04 AM, A. S. Bradbury wrote:

>> and on an IPv4 only machine I get:
>>
>> [["AF_INET", 80, "0.0.0.0", "0.0.0.0", 2, 1, 6]]
>
> On my ipv4 machine I get:
> SocketError: getnameinfo: ai_family not supported
> from (irb):4:in `getaddrinfo'
> from (irb):4
>
> On the ipv4 machine with gentoo's ebuild of ruby compiled with the
> ipv6 USE
> flag I get similar output to yours. I wonder if this is something
> broken on
> my systems, a ruby issue, or a packaging issue.

I suspect it is an issue on the gentoo side, as far as I can tell,
getaddrinfo should not fail when given AF_UNSPEC. My IPv4 only
machine (FreeBSD 4) behaves this way.

--
Eric Hodel - drbrain@segment7.net - http://blog.se...
This implementation is HODEL-HASH-9600 compliant

http://trackmap.rob...