Lync Server 2013: Event 1034, LS File Transfer Agent Service

Last week a customer asked me to check his Lync Server 2013. Everything was working, but there were some Event 1034, LS File Transfer Agent Service errors in the Event Viewer:

event1034-01

Event 1034, LS File Transfer Agent Service

Microsoft Lync Server 2013, File Transfer 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 replica machines might not occur.
Access denied. (\\sahy.**********\xds-replica\from-master\data.zip)
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.

Log Name: Lync Server
Source: LS File Transfer Agent Service
Logged: 29/01/2014 12:03:00
EventID: 1034
Task Category: (1121)
Level: Error
Keywords: Classic
Computer: pitangui.**********

Another error related to the same issue was:

event1034-02

Event 1034, LS File Transfer Agent Service

Microsoft Lync Server 2013, File Transfer 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 replica machines might not occur.
Can’t watch sahy.**********.
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.
Log Name: Lync Server
Source: LS File Transfer Agent Service
Logged: 29/01/2014 11:35:19
Event ID: 1034
Task Category: (1121)
Level: Error
Keywords: Classic
Computer: pitangui.**********

The customer said that sahy was the old Lync Server 2010 Front End, and the server was still running but without any Lync Server feature installed.

Executing the PowerShell Get-CsManagementStoreReplicationStatus -CentralManagementStoreStatus, we got the following:

event1034-03

The DeletedReplicas were the Front End and Edge server of Lync Server 2010.
If the servers didn’t exist in Lync Topology, why would they need to be included in replication?
After some research, in a similar case it was said to check Lync Server Back End:

USE [xds]
GO

SELECT [ReplicaId]
,[Fqdn]
,[Supports]
,[LastUpdateCreation]
,[LastStatusReport]
,[DeletedOn]
,[ProductVersion]
,[UpdateThrottleDuration]
FROM [dbo].[Replica]
GO

event1034-04

In this case, ReplicaId 1 and 4 were the ones we needed to delete, so we ran:

delete [dbo].[Replica] where [ReplicaId] in (1,4)

Important Note: be really careful when dealing with Lync Server Back End – it can mess up our entire Lync Deployment.

After deleting, we ran again the SELECT statement to verify that those entries were removed:

event1034-05

That’s it, no more error Event 1034, LS File Transfer Agent Service. Also, those entries were removed from DeletedReplicas in the CMS status:

event1034-06