On Wednesday, March 6, 2013 2:32:11 PM UTC+1, Brian Hunt wrote: > > It would seem that there are two issues at work: > 1. getaddrinfo is returning IPv4 addresses even though the name > `myhost.local` is tied only to an IPv6 address in /etc/hosts; and >
The probably cause for this is an error on your end. Maybe you forgot to save the file, or your libc implementation caches /etc/hosts somehow and you have to flush it? > 2. node.js prefers the IPv4 address, and does not fallback to the > alternatives upon a connection error. > If you really run into problems due to this, you might wrap the net.connect function with your own implementation. Just call the dns functions yourself and try to connect to reported addresses one by one. As I said, I'm willing to consider changing node's behaviour here (atleast there should be a getaddrinfo wrapper that returns more that just the first result) - but that'd be post node-0.10 effort and hence is atleast a couple of months away. (Ben / Isaac, thoughts on this?) - Bert -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
