Apple Event: May 7th at 7 am PT

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

Feb 3, 2016 9:42 PM in response to AX_BT

Hi AX_BT,


I ran your 'sudo mdutil -da' in the terminal and it did seem to fix the issue I was having with my drives and Time Machine, but I a strange permissions issue is now happening where every hour or so I am unable to open one of my drives. I get the message:


"The folder [name of drive] can't be opened because you don't have permission to see its contents."


When I look at permissions my administrator login (the one I'm in) only has "read" access. So I change it to read & write and then it works, for about an hour, then it happens again.

Can you please explain how to undo your code?


Thanks!

Feb 10, 2016 2:29 PM in response to cybergrisu

In my case it was one non-root user account that I had not signed into since the upgrade to El Capitan. I signed in and re-associated this user with iCloud, as you are pretty much forced to do when you upgrade and sign on for the first time, and to my surprise, those errors went away and the progress bar on the spotlight indexing is actually progressing now! Thanks for mentioning this trick / fix.

Feb 10, 2016 2:51 PM in response to kjbarth

Cybergrisu on Oct 27, 2015 3:32 PM said that:


In another thread I read that this has something to do with local user accounts which have not been logged in since the upgrade to El Capitan.

For me this was the enabled root-Account. So I logged in as root and after that I disabled root.

Now Spotlight completed.

The above advice worked for me! But in my case it was one non-root user account that I had not signed into since the upgrade to El Capitan. I signed in and re-associated this user with iCloud, as you are pretty much forced to do when you upgrade and sign on for the first time, and to my surprise, those errors went away and the progress bar on the spotlight indexing is actually progressing now! Thanks for mentioning this trick / fix.


FYI: None of the other advice had any effect whatsoever; I tried:

  1. sudo mdutil -E /
  2. That "well known" Apple Support procedure to reset the spotlight index by moving the root volume into Preferences -> Spotlight -> Privacy tab, and then remove it later...
  3. A procedure from (very knowledgeable and helpful) Linc Davis to remove the /var/folders/zz/zyxvpxvq6csfxvn_n00000b400002s folder (I did this via 'sudo rm -r /var/folders/zz/zyxvpxvq6csfxvn_n00000b400002s') and then reboot
  4. Even totally re-installing the OS X El Capitan from the recovery partition did nothing to help


None of that helped at all. I spent way too much time on this, but I hope this helps others as it did me -- thanks to Cybergrisu in my case...

Feb 10, 2016 2:57 PM in response to kjbarth

OMG!!! I spoke too soon. The "fix" was only temporary, all the bad messages are bake again, and spotlight indexing is frozen about 5% of the way it should go.


Sure would like a fix, but I've had it with this. It is filling the console log with the following errors sever times per second:


10/02/2016 20:07:38.861 mdworker[535]: [com.apple.corespotlight.log.index] Error caught while talking to the index agent, index:<CSSearchableIndex:0x7fc313a01310; 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/02/2016 20:07:38.862 mdworker[535]: [com.apple.corespotlight.log.index] Finished "index items"(288) with error:Error Domain=CSIndexErrorDomain Code=-1003 "(null)"


10/02/2016 20:07:38.862 mdworker[536]: [com.apple.corespotlight.log.index] Error caught while talking to the index agent, index:<CSSearchableIndex:0x7fdc62c180b0; 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/02/2016 20:07:38.862 mdworker[533]: [com.apple.corespotlight.log.index] Error caught while talking to the index agent, index:<CSSearchableIndex:0x7feba05082f0; 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/02/2016 20:07:38.862 mdworker[536]: [com.apple.corespotlight.log.index] Finished "index items"(288) with error:Error Domain=CSIndexErrorDomain Code=-1003 "(null)"

10/02/2016 20:07:38.862 mdworker[533]: [com.apple.corespotlight.log.index] Finished "index items"(288) with error:Error Domain=CSIndexErrorDomain Code=-1003 "(null)"

Feb 10, 2016 3:18 PM in response to kjbarth

kjbarth wrote:


OMG!!! I spoke too soon. The "fix" was only temporary, all the bad messages are bake again, and spotlight indexing is frozen about 5% of the way it should go.


Sure would like a fix, but I've had it with this. It is filling the console log with the following errors sever times per second:




I think that Apple does not realize there is a problem with Spotlight indexing getting overwhelmed - during high activity and with all the el Capitan is doing - it has finally come to pass.


I am still at snow leopard - 300gb drive with 168GB free because I keep a very tidy ship. - mac pro - 4GB of ram mostly not used.


In November was cleaning up some files - moving things around - had time machine running - and was doing a down load when the system froze -- based on the messages in console -- I think I caused a fire storm of MDworker jobs causing the freeze - that I thought was the clock battery - but now realize that it had to be the spotlight application - as the console logs always showed finder having a memory leak.


Rather than move the entire hard drive into private -- I put the folders from my desktop that are my stuff -- -- and that seems to have at least solved the problem of sluggish while cleaning up.


I excluded all except folders from spotlight search as the few times I used it - found it kept including PDF detail that I didn't want.


THe cleanup that crashed it -- was opening PDF files of manuals and printed to PDF articles from the internet - and deleting blank pages and in the case of web sites - removing the 7 pages past the article filled with junk -- that caused the storm - because some of the manuals are quite large.


Have not yet decided what to do with my Time Machine Drive - unplugged it as this problem also showed up when the drive was at 500MB used of a 1TB drive.


You all need to contact Apple Support or give a bug report -- try watching Activity monitor to see how many threads the MD jobs are running --

Feb 11, 2016 3:40 PM in response to joel from france

joel from france wrote:


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

mdworker runs Spotlight indexing. Disabling this will fix the above XPC error. Open Terminal > type without the quotes "sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist"

Feb 12, 2016 2:45 AM in response to kjbarth

Just to give you an update on my situation:


I realized that perhaps I did not give the spotlight update service (mdworker???) long enough to complete before I logged off as that user that I had not logged into since upgrading to El Capitan. Therefore I logged in as that user again, and again the errors stopped (after I had to first go to iCloud in System Preferences and re-establish this user's "connection" to it's iCloud account). But this time I did not log off until the indexing appeared to be completed (basically the mdworker processes for this user were no longer using up any further CPU time...). Then I logged off and carried on with my normal user on this system. All OK. Then I rebooted to see if the problem would return, but it did not!


So if you have these errors hitting your console log after upgrading to El Capitan then make sure you login as all users and leave them logged in long enough for their respective mdworker processes to "complete", and hopefully that will fix the problem in Spotlight. Well, it did for me.

Jun 6, 2016 9:44 AM in response to Xairoo

I fixed this issue a while back but I didn't keep careful notes. My general process was to


  1. Turn off Time Machine (because it could not back up while Spotlight was having problems.)
  2. Turn on Spotlight by removing then adding the problem volume in the Spotlight Preference Pane.
  3. Issuing "sudo mdutil -E /Volumes/$problem_volume" on the command line.
  4. Wait until Spotlight finished indexing (this step took about 4 days, if I remember correctly).


I then turned Time Machine back on once Spotlight was finished indexing and everything is working as expected. The key is to be patient with Spotlight once you turn it back on.

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.