[#7872] Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...>

All, I needed a nonblocking socket connect for my asynchronous-event

18 messages 2006/05/14
[#7873] Re: Nonblocking socket-connect — Tanaka Akira <akr@...17n.org> 2006/05/14

In article <3a94cf510605140559l7baa0205le341dac4f47d424b@mail.gmail.com>,

[#7874] Re: Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...> 2006/05/15

How about introducing the method Socket#set_nonblocking, or alternatively

[#7875] Re: Nonblocking socket-connect — Yukihiro Matsumoto <matz@...> 2006/05/15

Hi,

[#7876] Re: Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...> 2006/05/15

Well, it's ok then. I'm comfortable adding in the nonblocking

[#7877] Re: Nonblocking socket-connect — Yukihiro Matsumoto <matz@...> 2006/05/15

Hi,

Re: reproducible bug in DRb on OSX

From: cremes.devlist@...
Date: 2006-05-17 02:51:21 UTC
List: ruby-core #7884
On May 16, 2006, at 5:57 PM, Eric Hodel wrote:

> On May 16, 2006, at 12:25 PM, cremes.devlist@mac.com wrote:
>> [snip]
>>                     [],
>>                     :tcp_acl => ACL.new('allow 127.0.0.1'.split("  
>> "), ACL::ALLOW_DENY) # <-- causes failure
>>                     #:tcp_acl => ACL.new('allow localhost'.split("  
>> "), ACL::ALLOW_DENY)  <-- works
>>                     # works if you replace 127.0.0.1 with localhost
>
> DRb chose to listen on the IPv6 socket, so you'll need to allow  
> both 127.0.0.1 and ::1 or just use localhost.
>
> You could also try removing ::1 localhost from /etc/hosts, that  
> might fix it.

Adding "allow ::1" also makes this work. So, it appears to be a ipv6  
issue with DRb. Any hint as to how to fix this in a permanent  
fashion. Alternately, I can write up a short explanation (inventing  
things along the way to fill in my knowledge gaps) and submit it to  
the DRb maintainer as a documentation patch.

I can go either way.

>> # wait for the DRb service to finish before exiting
>> DRb.thread.join
>> -------------
>>
>> The error displayed by the client is:
>>
>> ~/developer/projects/ruby/bugs/drb-acl cremes$ ruby -w  
>> simple_client.rb druby://localhost:9000
>> /opt/local/lib/ruby/1.8/drb/drb.rb:567:in `load': connection  
>> closed (DRb::DRbConnError)
>
> I bet the connection came from ::1:9000 so DRb closed the connection.

This is apparently correct based on my success with adding "allow :: 
1" to the ACL.

cr


In This Thread