Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

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

mdworker XPC_ERROR_CONNECTION_INTERRUPTED and other errors?

Since upgrading to El Capitan, Spotlight indexing does not appear to proceed and I see these sorts of errors in the Log:


10/5/15 6:40:43.398 AM mdworker[2153]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database

10/5/15 6:40:43.399 AM mdworker[2153]: LaunchServices: Database mapping failed with result -10822, retrying

10/5/15 6:40:44.209 AM mdworker[2151]: Failed to retrieve system accounts: Error Domain=com.apple.accounts Code=10002 "(null)"

10/5/15 6:40:49.795 AM mdworker[2153]: [com.apple.corespotlight.log.index] Error caught while talking to the index agent, index:<CSSearchableIndex:0x7fc2b9415440; name="MDSFileProcessor", bundleID=com.apple.mail>, error:Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.spotlight.IndexAgent was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.spotlight.IndexAgent was invalidated.}

10/5/15 6:40:49.795 AM mdworker[2153]: [com.apple.corespotlight.log.index] Finished "index items"(90) with error:Error Domain=CSIndexErrorDomain Code=-1003 "(null)"


And many more with the above each repeated many many times.


Any ideas?

iMac, OS X El Capitan (10.11)

Posted on Oct 5, 2015 6:51 AM

Reply
28 replies

Oct 7, 2015 5:50 PM in response to MD3AG

This process works to help Time Machine do its job, but it doesn't seem to resolve the problem. I've tried this process four times with the same results: indexing stalls and the errors dragonlady16 reported appear. In fact, I see mdworker errors even with my HD marked for privacy.


For further reference, I've been in to each of the accounts on my iMac where I accessed Calendar, Notes, Mail, Safari, FaceTime, Messages, App Store, and Maps to help ensure that all of the 'new OS version' processes are completed. This *might* have helped me to complete my Time Machine backup, but it hasn't seemed to resolve the indexing errors.


I hope that others with this problem help get Apple's attention to this issue -- none of the touted new features of Spotlight are working while this situation persists. The fact that this stalled indexing holds up Time Machine backups is concerning too.

Oct 9, 2015 2:46 PM in response to AX_BT

I'm having the same issue on both my MacBook and my iMac. On the iMac it noticed that Time Machine was incredibly slow, disabling spotlight seemed to get it going as fast as I would expect. Having completed the back up now, and having it enabled again the backups seem ok, but I am still getting all these error messages. I've yet to try a Time Machine backup on the MacBook since upgrading to El Capitan, but certainly seeing the same error messages as on the iMac.


In about 12 mins mdworker has generated over 3000 entries into the console log!

Oct 10, 2015 9:49 AM in response to tphc

I am getting the same issue. Ever since upgrading to El Capitan, Spotlight doesn't work right, resulting in thousands of the following errors:


10/10/2015 17:35:51.155 mdworker[562]: LaunchServices: Database mapping failed with result -10822, retrying

10/10/2015 17:35:51.155 mdworker[562]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database

10/10/2015 17:35:51.158 mdworker[562]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database

10/10/2015 17:35:51.158 mdworker[562]: LaunchServices: Database mapping failed with result -10822, retrying

10/10/2015 17:35:51.158 mdworker[562]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database

10/10/2015 17:35:51.166 mdworker[562]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database

10/10/2015 17:35:51.166 mdworker[562]: LaunchServices: Database mapping failed with result -10822, retrying

10/10/2015 17:35:51.167 mdworker[562]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database

10/10/2015 17:35:51.181 mdworker[562]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database

10/10/2015 17:35:51.181 mdworker[562]: LaunchServices: Database mapping failed with result -10822, retrying

10/10/2015 17:35:51.182 mdworker[562]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database

10/10/2015 17:35:51.189 mdworker[562]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database


It appears this is also what is preventing TimeMachine from working properly.. and I don't even use Spotlight... Apple simply won't let me disable it (I add my entire computer to the privacy list, but on restart it removes that setting).

Oct 10, 2015 11:02 AM in response to greekgoddj

Executing the following command through Terminal should stop spotlight, if not the errors, and allow your TimeMachine backup to complete:


% sudo mdutil -da


The preceding command executes, as root, a stop-indexing command for all of your volumes. You will need to enter your administrative password when prompted. You can check the status with the following command (which does not require root access and thus excludes the sudo(8) command):


% mdutil -s


These next commands will display the help pages for mdutil(1) and sudo(8), which you may want to reference:


% man mdutil

% man sudo


. . .

In my experience, this works to free up the TimeMachine backup to do its job. It also seems that doing this and successfully completing a backup allows future backups to succeed--mine was found wanting and deleted after the upgrade to El Capitan so I was starting from scratch.


While I still have many mdworker errors in my logs, the status bar for indexing that appeared when I executed a Spotlight search during active indexing is gone; I assume that the indexing is complete, but the new 'natural language' searching seems not to work.


One additional step that I took which may have helped the indexing to complete was to run mdutil with the -E flag:


% sudo mdutil -E


This administrative instruction eliminated the previous index and forced the process to start over. I executed this after my TimeMachine backup completed with indexing turned off.

Oct 26, 2015 1:39 PM in response to dragonlady16

Me too. Initially, Time Machine (Capsule by Ethernet) conflicted with Spotlight. Uninstalling AnyConnect helped for a moment, but still not complete. Logging into all accounts and in the primary login account and putting all the user folders in the Privacy tab of Spotlight didn't help either. I had to disable Spotlight for the backup to finish. Cleaned the caches with Onyx. Then I re-enabled Spotlight, but indexing got stuck about halfway through. Console lists "trying to map database" along with error codes 10002, 10822 and 1003. Getting nowhere.

Nov 11, 2015 9:29 AM in response to macusercali

Same here.


My Macbook Air (mid 2013 running 10.11.1) started hanging seemingly randomly. I found this page after tracking down the Console errors.

I tried disabling mdutil and letting Time Machine run. But Time Machine always seems to re-enable SpotLight at some point, even with the MacintoshHD set to do not index in the SpotLight prefs.

I logged in as both the Admin and Guest users.


In the end I have given up and just rebooted into recovery; wiped the install and restored from a Time Machine backup from a couple of days ago (just before things started playing up).

After the wipe / re-install, things seem to be working OK... at the moment, but I'll post again if it starts freezing once more.

Nov 20, 2015 4:20 AM in response to AX_BT

Having exactly same problems, have tried all the mdutil options, still hangs my MacPro shortly thereafter - apparently when Time Machine starts to do its stuff. my Time Machine volume is explicitly excluded from spotlight, does not make a difference.


I will disconnect time machine media and turn it off, see if i can get some work done!


Any means by which i can wipe/clear spotlight cache/database and re-index - maybe leave it overnight? or clear preferences and re-exclude my Time Machine RAID array again?

Dec 28, 2015 2:31 AM in response to dragonlady16

Hello


I also had these messages which fill the system log:

Dec 28 10:57:02 xxxxx mdworker[13596]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database

Dec 28 10:57:02 xxxxx mdworker[13596]: LaunchServices: Database mapping failed with result -10822, retrying


I do not have Time Machine "on", nevertheless I went to System Preferences/Time Machine,

do to "options" and drag my hard disks to exclude them from (virtual ;-) Time Machine backups

(and I let Time Machine "Off")


It seems to solve the problem for me, but I do not understand why, as Time Machine was theoretically not running...

At least, messages have stopped filling my system log (until now... :-))


best regards

Jan 20, 2016 2:31 AM in response to cagecko

"No such job" means you typed "%" in the terminal window.


"%" is a special command in bash dealing with job control which is not relevant here : original poster meant % as a shell prompt, not a command to type.

As a general rule, avoid to type commands you don't understand in Terminal, especially if those invoque sudo (or run as root).

mdworker XPC_ERROR_CONNECTION_INTERRUPTED and other errors?

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