2010/12/01

Netextender corrupts mDNSResponder

A great way to start the day. My boss had some problems with his mac today. He wasn't able to surf at all. I checked all the layers and stranded at the highest level :).
  • nslookup www.google.com resolved the domain (same with dig)
  • ping 8.8.8.8 replied
  • ping www.google.com did not reply (can not resolve hostname)
  • internet in a VM worked correctly
I was quite sure that it had something to do with the way Mac OS X resolved the domain names. I also quickly learned that mDNSresponder is responsible for DNS since 10.6.4. Focusing on that I stumbled onto an article where NetExtender corrupts the xml that the services uses to boot. Since we were using NetExtender I thought I should give it a shot. First of all I copied my own xml from my working mac to a usb stick
sudo cp /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist /Volumes/stickname/

I then went in console at my boss computer (spotlight > terminal) and executed the sudo su command to enter root mode , the sh# prompt should appear. I entered the correct directory
  • cd /System/Library/LaunchDaemons/
and checked the files
  • ls -al com.apple.mDNSResponder*
This showed up 3 files, the regular plist file an nxbk file and the helper file which is not important.

I then compared the nxbk file and the regular file with the one back upped from my computer by using diff
  • diff com.apple.mDNSResponder.plist /Volumes/stickname/com.apple.mDNSResponder.plist
  • diff com.apple.mDNSResponder.plist.nxbk /Volumes/stickname/com.apple.mDNSResponder.plist
The nxbk file made by netextender before altering the plist was completely the same as the one I had on my USB stick. I decided that netExtender had corrupted the plist file so shut down the service, copying back the backup and relaunching the service could be a solution. So I executed the following (actually I backed up the files by cping them to /Users/someuser/)
  • launchctl unload /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
  • rm com.apple.mDNSResponder.plist
  • mv com.apple.mDNSResponder.plist.nxbk com.apple.mDNSResponder.plist
  • launchctl load /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
After that everything was working again.

BTW here is an output of my plist



2 comments:

Note: Only a member of this blog may post a comment.