Projects

Ticket #503 (closed defect: fixed)

Opened 2 years ago

Last modified 20 months ago

connect to udp socket: getaddrinfo: nodename nor servname provided, or not known (SocketError)

Reported by: marick@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 0.7
Component: MacRuby Keywords:
Cc:

Description

I'm on Snow Leopard (10.6.2), using xmpp4r. I can connect to the jabber server fine using Apple's stock Ruby (1.8.7 (2008-08-11 patchlevel 72)) but not with MacRuby 0.5 (beta 2). When I try the same code with MacRuby, I get this:

core:in `connect:': getaddrinfo: nodename nor servname provided, or not known (SocketError)
	from /Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/1.9.0/resolv.rb:690:in `initialize:'

That line is from this code in resolv.rb:

     class ConnectedUDP < Requester # :nodoc:
       def initialize(host, port=Port)
         super()
         @host = host
         @port = port
==>          @sock = UDPSocket.new(host.index(':') ? Socket::AF_INET6 : Socket::AF_INET)
         DNS.bind_random_port(@sock)
         @sock.connect(host, port)
         @sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
       end

Here's the code:

 http://pastie.org/739072

It's also attached, along with a huge sample(1) log

Attachments

connect.rb Download (0.7 KB) - added by marick@… 2 years ago.
Exited process_9340.7SXuzL.sample.txt Download (243.2 KB) - added by marick@… 2 years ago.

Change History

Changed 2 years ago by marick@…

Changed 2 years ago by marick@…

Changed 2 years ago by marick@…

I had to truncate the sample(1) file.

Changed 20 months ago by martinlagardette@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.7

Fixed with r4236.

It takes forever, but it seems to work.

Note: See TracTickets for help on using tickets.