Re: DNS resolution for apps vs Terminal?

2016-06-14 Thread Rick Mann
Thanks for the answers. Sigh.

A little more investigation showed that it had something to do with my router's 
DNS cache. Normally, it serves up itself as the DNS server for DHCP clients. 
When I reconfigured it to serve up Google's DNS servers instead, all apps 
started working normally.

This was also reflected on my iPhone. At the time of the problem, images 
weren't loading in the Facebook app (it's unclear if the rest of the content I 
could see was just cached or successfully loaded at that time). Changing the 
DNS servers used immediately fixed that problem.

I'm not sure what the differences between c-ares/dig and mDNSResponder are, in 
that one was able to look things up when using the router's DNS, and the other 
not.

> On Jun 14, 2016, at 08:41 , Alastair Houghton  
> wrote:
> 
> On 14 Jun 2016, at 15:13, Michael Nickerson  wrote:
>> 
>>> On Jun 14, 2016, at 5:11 AM, Rick Mann  wrote:
>>> 
>>> Just now Safari stopped being able to load facbook.com. So did Chrome. Both 
>>> reported DNS failures.
>>> 
>>> But dig on the command line, and curl, both succeed.
>>> 
>>> How are these two domains different?
>> 
>> Safari and other apps are using the frameworks to resolve DNS (which, I 
>> believe, is ultimately done via mDNSResponder, but I could be wrong on that 
>> one),
> 
> You’re correct.  It does use mDNSResponder (you can actually see the code on 
> Apple’s Open Source site).
> 
>> while command line programs are using lower level calls that query the DNS 
>> server directly.
> 
> dig does its own DNS protocol over ordinary sockets.  curl uses c-ares, an 
> open source DNS library.
> 
> Kind regards,
> 
> Alastair.
> 
> --
> http://alastairs-place.net
> 


-- 
Rick Mann
rm...@latencyzero.com



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: DNS resolution for apps vs Terminal?

2016-06-14 Thread Alastair Houghton
On 14 Jun 2016, at 15:13, Michael Nickerson  wrote:
> 
>> On Jun 14, 2016, at 5:11 AM, Rick Mann  wrote:
>> 
>> Just now Safari stopped being able to load facbook.com. So did Chrome. Both 
>> reported DNS failures.
>> 
>> But dig on the command line, and curl, both succeed.
>> 
>> How are these two domains different?
> 
> Safari and other apps are using the frameworks to resolve DNS (which, I 
> believe, is ultimately done via mDNSResponder, but I could be wrong on that 
> one),

You’re correct.  It does use mDNSResponder (you can actually see the code on 
Apple’s Open Source site).

> while command line programs are using lower level calls that query the DNS 
> server directly.

dig does its own DNS protocol over ordinary sockets.  curl uses c-ares, an open 
source DNS library.

Kind regards,

Alastair.

--
http://alastairs-place.net


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: DNS resolution for apps vs Terminal?

2016-06-14 Thread Michael Nickerson

> On Jun 14, 2016, at 5:11 AM, Rick Mann  wrote:
> 
> Just now Safari stopped being able to load facbook.com. So did Chrome. Both 
> reported DNS failures.
> 
> But dig on the command line, and curl, both succeed.
> 
> How are these two domains different?
> 

Safari and other apps are using the frameworks to resolve DNS (which, I 
believe, is ultimately done via mDNSResponder, but I could be wrong on that 
one), while command line programs are using lower level calls that query the 
DNS server directly.




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: DNS resolution for apps vs Terminal?

2016-06-14 Thread Aandi Inston
Really facbook.com ? If so, maybe it's some kind of protection, the site is
owned by MarkMonitor; perhaps there is a blocker on these things.

On 14 June 2016 at 10:11, Rick Mann  wrote:

> Just now Safari stopped being able to load facbook.com. So did Chrome.
> Both reported DNS failures.
>
> But dig on the command line, and curl, both succeed.
>
> How are these two domains different?
>
> --
> Rick Mann
> rm...@latencyzero.com
>
>
>
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/aandi%40quite.com
>
> This email sent to aa...@quite.com
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com