636f7374 / durian.cr

⛵️ Available - Crystal Domain Name System Resolver
MIT License
23 stars 5 forks source link

Cannot resolve specific host #4

Closed z64 closed 3 years ago

z64 commented 3 years ago

I have run into an issue attempting to use durian to resolve api.cognitive.microsoft.com. stdlib and other utilities can access and interact with this host fine, so it appears to be some issue with durian.. or perhaps I've misconfigured something?

I'm not that knowledgeable about DNS, so your help is appreciated. I have example you can try here that fails: https://git.sr.ht/~z64/durian-issue-4/tree

Output is:

got std socket: #<TCPSocket:0x7fa845b91d10>
Unhandled exception: Invalid host address (Socket::Error)
  from lib/durian/src/durian/resolver.cr:223:17 in 'get_tcp_socket!'
  from src/durian-issue-4.cr:19:7 in '__crystal_main'
  from ../../../../../usr/lib/crystal/crystal/main.cr:105:5 in 'main_user_code'
  from ../../../../../usr/lib/crystal/crystal/main.cr:91:7 in 'main'
  from ../../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
  from __libc_start_main
  from _start
  from ???
636f7374 commented 3 years ago

Reply

z64 commented 3 years ago

@636f7374 I can confirm this fix works for us - thank you for fixing this & my other issue!