From: Sam Roberts Date: 2006-05-18T08:48:09+09:00 Subject: Re: examples using reliable-msg gem? Quoting cremes.devlist@mac.com, on Wed, May 17, 2006 at 12:52:31PM +0900: > I figured out the problem. In the queue-manager.rb file the author > sets up an ACL for the DRbServer. The acl contains "allow 127.0.0.1". > For whatever reason, OSX binds to the port using IPv6 so the ACL > denies any connections coming through the loopback. > > There are two fixes. One workaround is to eliminate the ACL. > > The second workaround is to change the acl to read "allow 127.0.0.1, > allow ::1" where "::1" is the localhost equivalent for IPv6 > (alternately, change 127.0.0.1 to localhost). After this change inter- > process calls work. Sounds like the code is assuming localhost is 127.0.0.1. This isn't true, its BOTH ::1 and 127.0.0.1. The code should probably be consistent, either always use localhost, or always use IP addrs, but not both. Or if it can actually use IPv6, maybe it should bind to all the localhost addrs. Of course, if you don't have ipv6, there is only one IP addr that localhost resolves to. Also, most people take the first addr when they resolve a name, so if the first is usually ipv4, but sometimes (OS X, for example) ipv6, you get strangeness. > I hope the next person who runs into this problem finds this note. It > only took me 2 days to figure it out. :-) Ouch! Once bitten, you know... ruby code that does gethostbyname() for "localhost" and assumes the addr is ipv4 will not run on OS X (unless the OS X box has IPv6 turned off). Sam