BrianGilbert / OSXAegirInstaller

This script installs aegir on OSX using Homebrew
30 stars 10 forks source link

dns not resolving without an internet connection under Yosemite #34

Closed mjroeleveld closed 8 years ago

mjroeleveld commented 10 years ago

Since I have a new retina Macbook (late 2013, instead of my old late 2011 model), dnsmasq isn't working anymore when I am not connected to the internet. I saw you already implemented what should be a solution, but apparently this doesn't work for me.

The weird thing is, that I installed Aegir on a fresh Mavericks installation (which also ran on my previous Macbook), so I would guess that the problem lies in the hardware configuration; the new macbook has no longer an ethernet connection, only wireless.

The wireless adapter uses 127.0.0.1 as DNS, so that is not the source of the problem.

Any ideas?

BrianGilbert commented 10 years ago

^ this fixed it for me

mjroeleveld commented 10 years ago

Thanks, did it for me as well.

brentratliff commented 9 years ago

I ran the script after this commit and still have this problem.

BrianGilbert commented 9 years ago

Looks like this is due to a change in Yosemite, I can confirm it's happening again..

10007 > scutil --dns
DNS configuration

resolver #1
  nameserver[0] : 192.168.0.1
  if_index : 4 (en3)
  flags    : Request A records
  reach    : Reachable,Directly Reachable Address

resolver #2
  domain   : ld
  nameserver[0] : 127.0.0.1
  flags    : Request A records, Request AAAA records
  reach    : Reachable,Local Address

DNS configuration (for scoped queries)

resolver #1
  nameserver[0] : 192.168.0.1
  if_index : 4 (en3)
  flags    : Scoped, Request A records
  reach    : Reachable,Directly Reachable Address
[/etc/resolver]
[brian]
10008 > scutil --dns
No DNS configuration available
BrianGilbert commented 9 years ago

When connected to network:

10008 > dns-sd -G v4  aegir.ld
DATE: ---Wed 10 Dec 2014---
13:57:45.011  ...STARTING...
Timestamp     A/R Flags if Hostname                               Address                                      TTL
13:57:45.012  Add     2  0 aegir.ld.                              127.0.0.1                                    15

When disconnected

10009 > dns-sd -G v4  aegir.ld
DATE: ---Wed 10 Dec 2014---
13:57:56.497  ...STARTING...
Timestamp     A/R Flags if Hostname                               Address                                      TTL
13:57:56.498  Add     2  0 aegir.ld.                              0.0.0.0                                      60   No Such Record
BrianGilbert commented 9 years ago

also http://apple.stackexchange.com/questions/74639/do-etc-resolver-files-work-in-mountain-lion-for-dns-resolution#comment172533_82006

BrianGilbert commented 9 years ago

It looks like there won't be a quick fix for this.. multiple reports of this problem on the interwebs as of Yosemite

BrianGilbert commented 9 years ago

Supposed workaround: Enable your Ad-Hoc Wifi Network. (though it only appeared to allow terminal based DNS stuff, not browser)

brentratliff commented 9 years ago

That's confirmed. Browser definitely doesn't work. I have to do a lot of my work offline so I'm kind of stuck at the moment. I may have to have MAMP configure the sites off the same codebase for offline use.

BrianGilbert commented 9 years ago

@brentratliff you can always add a manual entry to /etc/hosts , that at least stops you from having to install another full stack.. I have a meeting with apple genius next weekend to see if this can get resolved.

BrianGilbert commented 9 years ago

you could also try this.. https://github.com/joedj/yosemite_dnsfix (didn't appear to work for me though)

brentratliff commented 9 years ago

I have been adding them in /etc/hosts. I meant to post that here for others. It wasn't working the first time I added them, so I looked into MAMP, but worked after a reboot.

BrianGilbert commented 9 years ago

@brentratliff to flush your local DNS execute the following (so you don't need to reboot when adding new host file entries)

sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches
BrianGilbert commented 9 years ago

This has been escalated to Apple engineers by myself and I am awaiting a response, a workaround that I've confirmed works (but am not electing to use myself) is available at: http://arstechnica.com/apple/2015/01/why-dns-in-os-x-10-10-is-broken-and-what-you-can-do-to-fix-it

mjroeleveld commented 9 years ago

Hmm, I don't think I want to take that risk either. Did you get a response?

BrianGilbert commented 9 years ago

Still awaiting a response, you can still use OSX Aegir, you'll just need to add a manual hosts entry for any hosts you want to access while disconnected.

mjroeleveld commented 9 years ago

Yes, I know. I still do all Drupal development on OSX Aegir. Indeed, for every site that I need to access offline, I add a line in the hosts file. Not ideal, but it works.

BrianGilbert commented 9 years ago

Response from applecare is that engineers said it's "Expected behaviour" no idea if they will ever fix it.. here is video I made showing the issue (no resolver available when you are disconnected from networks).

https://www.youtube.com/watch?v=3m9OI_AjCx8

https://news.ycombinator.com/item?id=8969581

mjroeleveld commented 9 years ago

Well, that's the second time I experience such behavior from Apple. Half a year ago they screwed me by not providing a solution for my fried #MacbookPro2011 and now this. I'm starting to dislike the company more and more.

dave0783 commented 9 years ago

Any update on this?

BrianGilbert commented 9 years ago

@dave0783 supposedly you can workaround this using a loopback device, I've just not had enough time to try and figure it out.

BrianGilbert commented 9 years ago

Resolved as of 10.10.4 (14E26a), Apple have changed back to mDNSResponder instead of discoveryd!