Replica Replicator Agent service encountered an error while accessing a file share

Lync uses a Central Management Store database to store all its configuration, and all Lync servers (even when co-located on the server where the CMS is located) use a local replica of this database. In between is a replication mechanism which updates the local replica periodically.

This mechanism makes use of a directory: C:\RtcReplicaRoot . As you may have already noticed, the directory inside (xds-replica) is not accessible by default. When trying to open it, Windows will ask if you want to take permission and ownership of the directory:

This is apparantly normal behaviour, and one should not press “continue”, nor change file permissions on the folder or structure beneath it! But, as you are reading this post, you’ve probably  pressed continue and meshed up the file permissions, ending up with a non-working CMS replication to the current lync server.

Now, because this directory is not accessible to Lync anymore, the local replication store cannot be updated anymore. Some events will show up in the Lync event log with event ID 3032:

Microsoft Lync Server 2010, Replica Replicator Agent service encountered an error while accessing a file share and will continuously attempt to access this file share until this issue is resolved. While this condition persists, replication to this replica machine might not occur.

IO failure occurred for Path=C:\RtcReplicaRoot\xds-replica\working\replication\tmp. Exception=Access to the path ‘C:\RtcReplicaRoot\xds-replica\working\replication\tmp\3b5b0e07-37eb-4bb3-9415-38fc8181d9ae’ is denied..
Cause: Possible issues with file share permissions. This can occur if the computer hosting the file share has outdated cached credentials for the computer that is trying to access the file share.
Resolution: For details about how to resolve file share permission issues, see the product documentation.

The most simple solution to this issue, is as follows:

  1. Re-create the folder structure/ rights and permissons in C:\RTCReplicaRoot. Most easy way to do this is to copy the folder structure and permissions from another lync server. Map the drive (I’ve mapped Z:\ in this example) of the failing server on a working server, and push the following command in an elevated command-prompt: xcopy C:\RtcReplicaRoot Z:\RtcReplicaRoot /O /X /E /T /H /K
  2. Re-start the replica replicator service.

Now, the replication should be working properly again. However, to force an update and check if the replication worked correctly (other than checking the event logs), the following steps can be taken:

  1. Start the lync management shell (elevated)
  2. Type the command: invoke-CSManagementStoreReplication
  3. After a few minutes, type the command: Get-CsManagementStoreReplicationStatus
  4. read the outcome. If all went well, you should see  “success” at the previously broken server.

Thanks to Drago Totev and Janne_b on the technet forums for pointing to this solution on a similiar issue.

3 Comments

  1. Pingback: Keynesian

  2. Pingback: Hot File Hosting

Leave a Reply

Your email address will not be published. Required fields are marked *