Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Why is discoveryd invoking the non-existent /var/run/mDNSResponder file?

DNS resolution is a nightmare in Yosemite. I spend about a quarter of my time since upgrading trying various hacks (unloading & loading discoveryd, deleting and recreating ethernet connections, cache clearing, and simple rebooting), just to get Chrome and Safari to resolve webpages. Something is obviously not working correctly in the OS. I noticed that in the /System/Library/LauchDaemons/com.apple.discoveryd.plist the ServiceDiscovery section of the plist invokes /var/run/mDNSResponder--a file that no longer exists in Yosemite. Is the solution to the discoveryd SNAFU that simple? If the invocation of var/run/mDNSResponder is erroneous, what should be invoked to end the discoveryd nightmare?


<dict>

<key>ServiceDiscovery</key>

<dict>

<key>SockFamily</key>

<string>Unix</string>

<key>SockPathName</key>

<string>/var/run/mDNSResponder</string>

<key>SockPathMode</key>

<integer>438</integer>

</dict>

</dict>

iMac, OS X Yosemite (10.10.3)

Posted on May 18, 2015 2:03 PM

Reply
Question marked as Best reply

Posted on May 18, 2015 5:19 PM

The file /var/run/mDNSResponder is alive and well in Yosemite. On a machine upgraded from 10.95 to 10.10.3 a couple of days ago I find:


bash-3.2$ ls -l /var/run/mDNSResponder

srw-rw-rw- 1 root daemon 0 17 May 11:13 /var/run/mDNSResponder


I've encountered three causes of discoveryd issues. First on the list is a fix that works in many cases is


Use 'Finder > Go' to go to this folder:


/Library/Preferences/SystemConfiguration/


Delete the file 'preferences.plist' and restart the Mac.


Second on the list is an invalid


/private/etc/hosts


often thanks to adware/malware. The default file should look like this:


##

# Host Database

#

# localhost is used to configure the loopback interface

# when the system is booting. Do not change this entry.

##

127.0.0.1 localhost

255.255.255.255 broadcasthost

::1 localhost


Third on my checklist is 'inconsistencies in the external DNS' and that's when the real fun begins...


C.

15 replies
Question marked as Best reply

May 18, 2015 5:19 PM in response to NewXPRefugee

The file /var/run/mDNSResponder is alive and well in Yosemite. On a machine upgraded from 10.95 to 10.10.3 a couple of days ago I find:


bash-3.2$ ls -l /var/run/mDNSResponder

srw-rw-rw- 1 root daemon 0 17 May 11:13 /var/run/mDNSResponder


I've encountered three causes of discoveryd issues. First on the list is a fix that works in many cases is


Use 'Finder > Go' to go to this folder:


/Library/Preferences/SystemConfiguration/


Delete the file 'preferences.plist' and restart the Mac.


Second on the list is an invalid


/private/etc/hosts


often thanks to adware/malware. The default file should look like this:


##

# Host Database

#

# localhost is used to configure the loopback interface

# when the system is booting. Do not change this entry.

##

127.0.0.1 localhost

255.255.255.255 broadcasthost

::1 localhost


Third on my checklist is 'inconsistencies in the external DNS' and that's when the real fun begins...


C.

May 18, 2015 9:44 PM in response to NewXPRefugee

Please read this whole message before doing anything.

This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.

Step 1

The purpose of this step is to determine whether the problem is localized to your user account.

Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”

While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.

Test while logged in as Guest. Same problem?

After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.

*Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.

Step 2

The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.

Please take this step regardless of the results of Step 1.

Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem.

Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.

Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.

The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.

Test while in safe mode. Same problem?

After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

May 19, 2015 6:27 AM in response to cdhw

I cleared "preferences.plist" as suggested by you as a first step. My "discoveryd" problem has not returned for several hours. Previously it would always come back within 30 minutes of a restart.

I had previously reinstalled Yosemite but no improvement and signed on as a Guest to no effect.


My iMac of 2007 was almost unusable before I applied your fix

Thanks

May 22, 2015 7:53 AM in response to NewXPRefugee

cdhw: Thanks for your input.


I got the same results as you using terminal to confirm that mDNSResponder still existed. Oddly, when navigating to //var/run/mDNSResponder in finder, it does not appear, which is what prompted my inquiry.

I had deleted the preferences.plist before, but I did it again on all three computers on my network. Did not solve the delays and failures in resolving web pages.


The /private/etc/hosts file is the default.

May 22, 2015 8:42 AM in response to NewXPRefugee

Finder is not a good tool for poking around in the system files, there are things it doesn't show in order to avoid confusing the typical user. /var/run/mDNSResponder is actually a zero length file. It's purpose, I assume, is to provide backwards compatibility because mDNSResponder has been superseded by discoveryd in Yosemite.


You could try deleting the entire contents of /Library/Preferences/SystemConfiguration/. In my experience it's the preferences.plist that causes the problems, but there are plenty of other possibilities lurking in that folder.

Something is obviously not working correctly in the OS.


I'd keep an open mind about this, a badly configured DNS server can be difficult to diagnose and cause all sorts of mysterious problems. If the problem happens with a clean user account in safe mode with a single network interface active then the finger of suspicion starts pointing to something about or on the network itself.


What does the System Log (in Console.app) say is happening at the time the problem occurs?


C.

May 22, 2015 9:02 AM in response to Linc Davis

Mr. Davis:


I performed the tests you suggested. Regarding the first test, I have the problem when logged in as Guest.


Test 1

Using Safari, after 7 seconds, it reported that Safari could not open "https://google.com/search." Safari is rather annoying in that once the dns lookup fails, Safari refreshes to the failure page, not the original url, unless you click within the address bar (and that only works sometime). Nevertheless, Safari could navigate to www.philly.com. After 60 seconds, the page loaded incompletely. It had some text, but pictures, videos and ads did not load. Moreover, links appear, but they do not function when I click upon them. If I alternative click on them and open in a new tab, the linked page loads. If I load the home page, then reload the home page, the links become clickable. Even then, some links to different domains result in complete page-load failures.


Using Google Chrome, there were still some complete failures of dns lookup, but these could be resolved by clicking the refresh button. The times to full page loading ranged from quick (2 seconds) to ridiculous (2:45 minutes). A pages' text may be readable quickly, but picture, ads and videos, take minutes to fully load. sometimes only after refreshing the page. Tracking resolution using chrome://net-internals/#events&q=type:HOST_RESOLVER_IMPL_JOB%20is:active reveals that individual addresses each may take seconds to resolve, and when they do, they hold up the resolution of other pending lookup. Even if a page become readable, Chrome is taking minutes to fully resolve the links on the page as shown by the unresolved list in the Chrome net-internals page and the message (Resolving host . . .) which appears in the lower left of the target page browser window.


Test 2

Booting the server or a client laptop in safe mode (after flushing the dns caches in the OS and in Chrome), results in essentially the same behaviors. Safari dns look up times out, and repeated manual refreshes are required to get pages to load partially or fully. Chrome will load pages but in Safe Mode it flickers with each resolution of a component. Thus, Chrome will flicker for 30 seconds to 2 minutes until it appears stable, and any click will reintroduce the flicker for a period.


Other


I have examined the dns logs (performing a "tail -f /Library/Logs/named.log" and examining the DNS service log in Server 4 appear to be equivalent). There are massive amounts of errors for every page load. IPv6 queries report "error (host unreachable) resolving xxx.xxx.xxx.:53." IPv4 queries report "error (connection refused) resolving xxx.xxx.xxx.:53". The connections are being refused by Google (8.8.8.8 and 8.8.4.4), my forwarding dns lookups, as well and verisign and many many others. Yet, with delays, I do get DNS resolution of outside webpages.


I am running a Yosemite Server on an iMac, with two other Yosemite machines on the network. The network is behind a Netgear firewall and a Comcast Cable modem. Except for the Netgear, none of the machines are running a firewall. Port 53 is open under both the UDP and TPC protocols. The forwarding DNS lookups are set to Google in all the machines.

May 23, 2015 8:48 AM in response to NewXPRefugee

Start up in Recovery mode. In the OS X Utilities screen, select Get Help Online. A clean copy of Safari will launch. No plugins, such as Flash, will be available. While in Recovery, you'll have no access to your saved bookmarks or passwords, so make a note of those before you begin, if they're needed for the test.

Test. After testing, restart as usual and post the results.

May 26, 2015 10:50 AM in response to Linc Davis

I ran this test, after flushing the mdns cache and udns cache. Before rebooting in Recovery mode to use Safari, I attempted to visit Netlix.com. The site loaded, but without applying the css to format the page. In Recovery Mode, Safari loaded Netflix properly, but after a delay of about 15 seconds. Thereafter, Safari was initially very fast, loading Huffington Post and Philly.com quickly. Performance then deteriorated within minutes, with fast loading of functional pages becoming sporadic. Some sites still took up to a minute to resolve. Reloads were necessary for full resolution of page content and the reloads took 15-30 seconds to display anything, which was often longer than the initial, partial load time. Generally, Safari functioned better in Recovery Mode than it does in normal mode, but there were still problematic delays.

May 26, 2015 11:09 AM in response to NewXPRefugee

My guess is that you have got some plug-in or extension that is causing the slow-downs. I recommend that you run EtreCheck:


http://www.etresoft.com/etrecheck


and post the results here so we can see what goodies you have installed.


Also, all the advice you'll get from here will assume that you have a stock install of OS 10.10.3. You clearly know enough to be dangerous 🙂 so, if you have 'tweaked' anything, for example by replacing cache directories with symbolic links to pseudo-devices, now is the time to tell us about it.


C.

May 26, 2015 4:40 PM in response to cdhw

EtreCheck version: 2.2 (132)

Report generated 5/26/15, 7:32 PM

Download EtreCheck from http://etresoft.com/etrecheck


Click the [Click for support] links for help with non-Apple products.

Click the [Click for details] links for more information about that line.


Hardware Information: ℹ️

iMac (27-inch, Mid 2011) (Technical Specifications)

iMac - model: iMac12,2

1 2.7 GHz Intel Core i5 CPU: 4-core

16 GB RAM Upgradeable

BANK 0/DIMM0

8 GB DDR3 1333 MHz ok

BANK 1/DIMM0

8 GB DDR3 1333 MHz ok

BANK 0/DIMM1

Empty

BANK 1/DIMM1

Empty

Bluetooth: Old - Handoff/Airdrop2 not supported

Wireless: en1: 802.11 a/b/g/n


Video Information: ℹ️

AMD Radeon HD 6770M - VRAM: 512 MB

iMac 2560 x 1440


System Software: ℹ️

OS X 10.10.3 (14D136) - Time since boot: 2:37:12


Disk Information: ℹ️

ST31000528AS disk0 : (1 TB)

EFI (disk0s1) <not mounted> : 210 MB

Macintosh HD (disk0s2) / : 999.35 GB (71.72 GB free)

Recovery HD (disk0s3) <not mounted> [Recovery]: 650 MB


HL-DT-STDVDRW GA32N


ST4000DX000-1CL160 disk1 : (4 TB)

EFI (disk1s1) <not mounted> : 210 MB

LaCie (disk1s2) /Volumes/LaCie : 4.00 TB (1.49 TB free)


USB Information: ℹ️

Western Digital My Passport 0746 1 TB

EFI (disk3s1) <not mounted> : 210 MB

My Passport (disk3s2) /Volumes/My Passport : 999.83 GB (168.26 GB free)

Apple, Inc. Keyboard Hub

SanDisk SDDR-189

Apple, Inc Apple Keyboard

Apple Internal Memory Card Reader

Apple Computer, Inc. IR Receiver

Apple Inc. FaceTime HD Camera (Built-in)

HewLett Packard HP LaserJet 1200

Apple Inc. BRCM2046 Hub

Apple Inc. Bluetooth USB Host Controller


Firewire Information: ℹ️

HGST G-DRIVE 800mbit - 800mbit max

EFI (disk2s1) <not mounted> : 210 MB

G Tech 4TB (disk2s2) /Volumes/G Tech 4TB : 4.00 TB (65.63 GB free)


Thunderbolt Information: ℹ️

Apple Inc. thunderbolt_bus

LaCie d2


Gatekeeper: ℹ️

Mac App Store and identified developers


Kernel Extensions: ℹ️

/Volumes/My Passport/Applications/VMware Fusion.app

[not loaded] com.vmware.kext.vmci (90.4.19) [Click for support]

[not loaded] com.vmware.kext.vmioplug.10.1.26 (10.1.26) [Click for support]

[not loaded] com.vmware.kext.vmnet (0194.56.92) [Click for support]

[not loaded] com.vmware.kext.vmx86 (0194.56.92) [Click for support]

[not loaded] com.vmware.kext.vsockets (90.4.24) [Click for support]


Problem System Launch Daemons: ℹ️

[failed] com.apple.mtrecorder.plist


Launch Agents: ℹ️

[not loaded] com.adobe.AAM.Updater-1.0.plist [Click for support]

[loaded] com.adobe.CS5ServiceManager.plist [Click for support]

[loaded] com.google.keystone.agent.plist [Click for support]

[loaded] com.oracle.java.Java-Updater.plist [Click for support]


Launch Daemons: ℹ️

[loaded] com.adobe.fpsaud.plist [Click for support]

[not loaded] com.adobe.SwitchBoard.plist [Click for support]

[failed] com.apple.spirecorder.plist

[loaded] com.google.keystone.daemon.plist [Click for support]

[loaded] com.oracle.java.Helper-Tool.plist [Click for support]

[loaded] com.oracle.java.JavaUpdateHelper.plist [Click for support]


User Launch Agents: ℹ️

[loaded] com.adobe.AAM.Updater-1.0.plist [Click for support]

[loaded] com.adobe.ARM.[...].plist [Click for support]


User Login Items: ℹ️

Mail Application Hidden (/Applications/Mail.app)

Dropbox Application Hidden (/Applications/Dropbox.app)


Internet Plug-ins: ℹ️

FlashPlayer-10.6: Version: 17.0.0.188 - SDK 10.6 [Click for support]

QuickTime Plugin: Version: 7.7.3

Flash Player: Version: 17.0.0.188 - SDK 10.6 Cannot contact Adobe

AdobePDFViewer: Version: 9.5.5 [Click for support]

Default Browser: Version: 600 - SDK 10.10

Silverlight: Version: 5.1.30514.0 - SDK 10.6 [Click for support]

JavaAppletPlugin: Version: Java 8 Update 45 Check version


3rd Party Preference Panes: ℹ️

Flash Player [Click for support]

Java [Click for support]


Time Machine: ℹ️

Skip System Files: NO

Mobile backups: OFF

Auto backup: NO - Auto backup turned off

Volumes being backed up:

Macintosh HD: Disk size: 999.35 GB Disk used: 927.62 GB

Destinations:

My Passport [Local]

Total size: 999.83 GB

Total number of backups: 0

Oldest backup: -

Last backup: -

Size of backup disk: Too small

Backup size 999.83 GB < (Disk used 927.62 GB X 3)


Top Processes by CPU: ℹ️

22% Google Chrome Helper(5)

6% WindowServer

5% Google Chrome

2% python(3)

2% fontd


Top Processes by Memory: ℹ️

1.08 GB kernel_task

901 MB ruby(12)

705 MB Google Chrome Helper(5)

311 MB clamd

246 MB mdworker(8)


Virtual Memory Information: ℹ️

6.25 GB Free RAM

9.74 GB Used RAM

0 B Swap Used


Diagnostics Information: ℹ️

May 26, 2015, 04:51:56 PM Self test - passed


Standard users cannot read /Library/Logs/DiagnosticReports.

Run as an administrator account to see more information.

May 26, 2015 5:09 PM in response to NewXPRefugee

Try:


System Preferences > Java

Java Control Panel > Security

uncheck the 'Enable Java Content in the browser' option, click 'Apply...'

As far as I'm aware 'Google Chrome Helper' is nothing to do with DNS, it 'helps' Chrome extensions like Flash, Java, Quicktime, Silverlight etc. to perform their evil work without you having to click 'play'. Dig down into each of your Chrome plugins and disable 'Autoplay'.


C.

Jun 1, 2015 11:32 AM in response to NewXPRefugee

This ultimately was a problem with a misconfigured router. The problematic router, a Netgear wireless router, had not been configured with the routers preset DNS settings (DNS:UDP & DNS:TCP). Rather, the only DNS setting put in the router were manual forward of port 53 (UDP) and port 53 (TCP). That allowed the internet to get the server's SOA but was confounding the OS's and Chrome's resolvers. Unlike the preset that existed in the router, the manual set up failed to open the high numbered ports through which the DNS resolvers worked their magic. The problem was diagnosed by substituting a different router (same model, but not wireless), which immediately opened the high numbered ports and resolved the issue. On the wireless model, the presets services were a little hidden: they are accessed by clicking the "Add," not on the services tab, but directly on the rules tab. Once that was discovered, and the presets for DNS were invoked and the manually created DNS forwards were disabled, DNS resolution functioned properly on both routers. The bottom line is that the DNS presets open more than just port 53, and are necessary for the efficient functioning of the DNS resolvers within OS X 10.10.3 Yosemite and the DNS resolver internal to Google Chrome.


This resolved the following error message:


"error (connection refused) resolving [webaddress]#53"

It also eliminated the traffic jam of unresolved addresses in Google Chrome's resolver that would appear here:

chrome://net-internals/#events&q=type:HOST_RESOLVER_IMPL_JOB%20is:active


Thanks to everyone who took the time to help me with this problem.

Why is discoveryd invoking the non-existent /var/run/mDNSResponder file?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.