Closed perlun closed 6 years ago
Same problem with celluloid-io df768cd3cdb2 btw, so not yet fixed. Comment from @tarcieri:
https://github.com/celluloid/celluloid-io/blob/master/lib/celluloid/io/dns_resolver.rb#L22
@tarcieri: That's not really the same issue actually. It's this method that fails:
def self.nameservers(config = RESOLV_CONF)
File.read(config).scan(/^\s*nameserver\s+([0-9.:]+)/).flatten
end
...which isn't really so weird since this is the value of RESOLV_CONF:
RESOLV_CONF = '/etc/resolv.conf'
:-)
I looked at the code briefly and it seems like the reason why we need to find the DNS server ourself is since we are creating DNS requests manually (unsure of the exact reason for this). I wonder if it would be acceptable to just make Celluloid::IO::DNSResolver fall back to Resolv.getaddress if it runs on Windows? Of course, this presumes that https://github.com/jruby/jruby/issues/773 gets fixed first...
unsure of the exact reason for this). I wonder if it would be acceptable to just make Celluloid::IO::DNSResolver
This would create blocking I/O requests that hang the reactor
Good point, Tony. ;) How about this one? https://github.com/celluloid/celluloid-io/pull/65
I've tested it and it works correctly for me (JRuby 1.7.4, Java 1.7.0_10). Of course it would be better to do it even more cleanly, but this was the best I could accomplish for the time being. Given that the previous code is completely defunct on Windows, it's at least a step in the right direction...
(I also fixed the /etc/hosts to be read correctly on Windows, which was easier and less controversial.)
This problem also exists on Ruby 2.0 on Windows.
@deadprogram can you try celluloid-io 0.15.0.pre
?
Still getting this error on Windows 7 with 0.15.0.pre:
E, [2013-08-26T18:19:38.940150 #2516] ERROR -- : No such file or directory - /etc/resolv.conf
Okay, time to re-evaluate something like #65
This probably won't make it out in Celluloid::IO 0.15.0 but we can try to get it into 0.15.1
Tony,
I'll see if I can find some time to look into it further (try to make #65 work on top of the latest master).
Best regards, Per
On Tue, Aug 27, 2013 at 5:22 AM, Tony Arcieri notifications@github.comwrote:
Okay, time to re-evaluate something like #65https://github.com/celluloid/celluloid-io/issues/65
This probably won't make it out in Celluloid::IO 0.15.0 but we can try to get it into 0.15.1
— Reply to this email directly or view it on GitHubhttps://github.com/celluloid/celluloid-io/issues/64#issuecomment-23309167 .
mvh, Per Lundberg
@perlun cool, thanks!
@luislavena if we used Win32::Resolv.get_resolv_info
here would that actually resolve this issue?
@tarcieri Win32::Resolv
(win32/resolv
) uses the Windows registry to read nameserver information and the interfaces configurations.
I believe is a reliable mechanism on WIndows to perform the task required here.
@luislavena cool, thank you!
How are we doing with this, since 11/13?
Age old, closing.
It seems like the Celluloid::IO DNS resolver is a bit Unix-only for the moment. This is what I get when trying to run it on JRuby for Windows (when using it with a DNS host name; specifying an IP address works correctly).