See Ars: Why DNS in OS X 10.10 is broken, and what you can do to fix it
Random failures to resolve DNS names. This is rare, but every once in a while, Safari stops loading any and all websites. Turns out that the OS X DNS resolver has stopped working. (Command line tools such as nslookup, host, or dig still work because those use their own DNS lookup code.)
Copied from the Ars article...
Restoring mDNSResponder, if you dare
First a word of warning: if something goes wrong, your Mac may not be able to boot. This can be fixed by booting in single user mode and re-enabling discoveryd (see below). Be sure you have a recent backup just in case, and only follow the steps below if you are prepared to boot into single user mode if needed.
The first thing you need to do is find copies of 10.9 mDNSResponder, mDNSResponderHelper, and their plist files. On a 10.9 system, they're found in /usr/sbin/ and /System/Library/LaunchDaemons, respectively. These Terminal commands will copy them to the desktop for easy copying to the 10.10 system on which you want to install them:
cd ~/Desktop/
cp /usr/sbin/mDNSResponder .
cp /usr/sbin/mDNSResponderHelper .
cp /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist .
cp /System/Library/LaunchDaemons/com.apple.mDNSResponderHelper.plist .
Another way to get the mDNSResponder and its helper is from a Time Machine backup. Connect your Time Machine drive or click on the backup image on your (Time Capsule) network drive. Next, navigate to a backup from before October 16, when you were still running OS X 10.9, along these lines:
cd /Volumes/Time Machine Backups/Backups.backupdb/
cd <my machine name>
ls
cd <date/time of backup>
cd Macintosh\ HD
cp usr/sbin/mDNSResponder ~/Desktop/
cp usr/sbin/mDNSResponderHelper ~/Desktop/
cp System/Library/LaunchDaemons/com.apple.mDNSResponder.plist ~/Desktop/
cp System/Library/LaunchDaemons/com.apple.mDNSResponderHelper.plist ~/Desktop/
With these preparations in place, you can copy the mDNSResponder and helper to the OS X 10.10 machine:
sudo cp mDNSResponder /usr/sbin/
sudo cp mDNSResponderHelper /usr/sbin/
sudo cp com.apple.mDNSResponder.plist /System/Library/LaunchDaemons/
sudo cp com.apple.mDNSResponderHelper.plist /System/Library/LaunchDaemons/
Then, deactivate discoveryd and activate mDNSResponder. Remember, sudo makes a command execute with root or system administrator privileges, so it asks for a system administrator password. Don’t worry if you get "Could not find specified service."
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd_helper.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponderHelper.plist
Now reboot.
Should you wish to reactivate discoveryd, use the following commands. If your machine won't boot properly, boot in single user mode by rebooting while holding command-S and then you'll be able to type these commands. Type "exit" when you're done.
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponderHelper.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd_helper.plist
You may be wondering which new OS X 10.10 features no longer work because you're using an older version of such an important system component. As far as we've been able to tell in a short period of testing, all the headline ones all still there—Handoff and AirDrop work in both directions. Enjoy your rediscovered network stability.
- No guarantees!
- Find someone to help if you're not up to this.
- Make a backup first.
- Make sure you know how to boot into single user mode in case this doesn't work.
discoveryd
by runningsudo killall discoveryd
(the system will automatically relaunchdiscoveryd
).