-
Notifications
You must be signed in to change notification settings - Fork 93
Resolv::ResolvError for hosts resolved by /etc/resolver/* files on OS X #105
Comments
Celluloid uses its own asynchronous DNS resolver to prevent DNS requests from blocking the Celluloid::IO event loop. My first advice would be to try master. We just merged some changes to the DNS resolver in f156afb that might address your problem. This should, hopefully, use Ruby's own Resolv to do the local hostname lookups. |
I gave it a go and the results were the same. My original post was a bit lengthy so to summarize:
I looked into it more and it looks like TCPSocket uses I noticed pull #65 was an attempt to fix some platform-specific issues with DNS resolution. Is there still an effort to continue in this direction? |
You could make dnsmasq your default resolver and let it forward all queries it can't answer to the other dns server Von einem mobilen Gerät gesendet
|
@Asmod4n That is indeed a temporary workaround I've been using. |
@gevans is this still an issue for you, or has your workaround been enough? |
After rereading my original post, I realize I wasn't very clear on what my issue was. The issue I have is that It assumes DNS servers are only specified in As an example, Linux (glibc) has /etc/nsswitch.conf which provides many different methods for resolution. Some distributions like CoreOS use this facility to handle resolution through additional discovery mechanisms. Avahi (Bonjour) also uses this to allow This isn't normally a problem because the C library of each platform handles these specifics for the developer. This difference should either be fixed or documented somewhere. Admittedly, I'm no longer using Celluloid::IO so this is no longer my issue. Please feel free to close at your own discretion. 😄 |
@gevans thanks for the in-depth description of the situation even though you're no longer using Celluloid::IO! |
libuv has a async dns resolver build in, which libev is missing; I don't know how Java solves the blocking issues. So this is more likely a nio4r issue. |
@gevans what? No, that's completely incorrect. The code for handling things like https://github.com/celluloid/celluloid-io/blob/master/lib/celluloid/io/dns_resolver.rb#L36 |
@tarcieri My bad. Ignore that statement. |
I'll admit Celluloid::IO doesn't have the world's greatest DNS resolver and would be happy to consider alternatives |
RubyDNS has an awesome DNS resolver :) |
@ioquatix can you abstract your resolver and provide it as a stand-alone gem? |
@ioquatix it'd be nice if you could use RubyDNS's resolver with Celluloid::IO |
It should be trivial to extract into a gem. |
I'm experiencing inconsistent DNS resolution between initializing a new
Celluloid::IO::TCPSocket
and initializing a regularTCPSocket
:I'm not entirely certain what the difference in host resolution is between the two implementations.
Socket.gethostbyname
works fine whileResolve.getaddress
fails similarly toCelluloid::IO::DNSResolver#resolve
.Boxen uses dnsmasq to set up a
*.dev
wildcard that resolves to127.0.0.1
. The interesting thing however, is that the nameserver is specified in/etc/resolver/dev
, what appears to be an OS X-specific format where the name of the file is the TLD and the contents is a regular/etc/resolv.conf
definition:Anyway, I'm not sure what the project's stance is in regard to supporting odd platform-specific setups (there's only enough room for Windows to do that!) but I'm curious what the reason is for resolution to be working fine everywhere else.
Thanks!
The text was updated successfully, but these errors were encountered: