DFS-R: Replication Error Status

Microsoft.Windows.FileServer.DFSR.ReplicationStoppedOnErrorMonitor (UnitMonitor)

This object monitors replication and creates a Warning alert if replication stops due to an error.

Knowledge Base article:

Summary

This object monitors replication and creates a Warning alert if replication stops due to an error. It does so by checking for the presence of DFS Replication Event 4004 in the DFS Replication event log.

Causes

An unhealthy state of this monitor indicates that replication has stopped on a replicated folder due to an error. This can occur for a number of reasons, including the following:

More information about the specific reason which caused this event to be triggered can be found in the event text itself.

Resolutions

Increase available disk space

To resolve this issue, use the following procedure:

1. Check the error listed in the alert description in the Operations console. The following error is listed when there is not enough available disk space: Error 112 (There is not enough space on the disk.)

2. Increase the available disk space on the volume, increase the size of the volume, or increase the folder quota set on the folder containing the staging folder.

To manually check the amount of available disk space, open a command prompt window and type the following command, where [servername] is the name of the server hosting the affected folder and [domain\user] is your user name:

WMIC /node: "[servername]" /user: [domain\user] volume list status.

After freeing up space, restart the DFS Replication service.

Adjust DFS Replication quotas

You can edit the quota size of the staging folder and the Conflict and Deleted folder to reduce the disk space requirements of DFS Replication. To do so, see Edit the Quota Size of the Staging Folder and Conflict and Deleted Folder (http://go.microsoft.com/fwlink/?LinkId=186944).

Important: If a staging folder quota is configured to be too small, DFS Replication might consume additional CPU and disk resources to regenerate the staged files. Replication might also slow down because the lack of staging space can effectively limit the number of concurrent transfers with partners. Increasing the size of the staging folder and the Conflict and Deleted folder can increase replication performance and the number of recoverable conflicting and deleted files.

Correct the replicated folder permissions

If the DFS Replication service doesn’t have Full Control permissions to the replicated folder and staging folder, replication will fail. To resolve this issue, grant the local System account Full Controlpermissions to the replicated folder and subfolders as well as the staging folder (if located outside of the replicated folder).

Fix the path of the replicated folder

To resolve this issue, confirm that the local path of the replicated folder is available, and bring the volume online if necessary.

If the path has changed, you must remove the server’s membership in the replication group and recreate it. Doing so requires membership in the Domain Admins group or delegated permissions.

Confirm that the failover cluster resource is online

If the server is a member of a failover cluster, confirm that the DFS Replication resource is online. To do so, open Failover Cluster Manager on the affected server and confirm that the status of the appropriate clustered file server instance is Online. If it isn’t, select the appropriate resource and then click Bring this service or application online.

To do so by using Windows PowerShell™, open a Windows PowerShell command prompt window while logged on with an account that is a member of the local Administrators group on the failover cluster, and then type the following command, where [replicatedfolder_rootpath] is the root path of the replicated folder hosted by the clustered file server instance:

get-wmiobject -namespace root\mscluster -class MSCluster_Resource -Filter "name='DFSR [replicatedfolder_rootpath]'"

If the resource is online, the value of the State field should be 2.

Important: Add a second backslash (\) before any backslashes in the replicated folder root path. For example d:\shares\public would be written as d:\\shares\\public.

Verification

After replication completes, this monitor automatically resets to a healthy state.

To manually confirm that replication is healthy, run a propagation test on the affected folder by using DFS Management or the following commands, where [ReplicationGroup]is the name of the replication group and [ReplicatedFolder]is the name of the replicated folder:

dfsrdiag propagationtest /rgname:"[ReplicationGroup]" /rfname:"[ReplicatedFolder]" /testfilename:DFS-RTestFile.xml

dfsrdiag propagationreport /rgname:"[ReplicationGroup]" /rfname:"[ReplicatedFolder]" /testfilename:DFS-RTestFile.xml /reportfilename:c:\DFS-R_Report.xml

Additional

Element properties:

TargetMicrosoft.Windows.FileServer.DFSR.ReplicatedFolder
Parent MonitorSystem.Health.AvailabilityState
CategoryStateCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.2SingleEventLog2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
DFS-R: Replication Stopped Due to an Error

The DFS Replication service stopped replication on the replicated folder at local path {0}.
Additional Information: Error: {1} ({2})
Additional context of the error: {3} Replicated Folder Name: {4}
Replicated Folder ID: {5} Replication Group Name: {6}
Replication Group ID: {7}
Member ID: {8}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.Windows.FileServer.DFSR.ReplicationStoppedOnErrorMonitor" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.FileServer.DFSR.ReplicatedFolder" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.2SingleEventLog2StateMonitorType" ConfirmDelivery="true">
<Category>StateCollection</Category>
<AlertSettings AlertMessage="Microsoft.Windows.FileServer.DFSR.ReplicationStoppedOnErrorMonitor_AlertMessageResourceID">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Params/Param[3]$</AlertParameter1>
<AlertParameter2>$Data/Context/Params/Param[4]$</AlertParameter2>
<AlertParameter3>$Data/Context/Params/Param[5]$</AlertParameter3>
<AlertParameter4>$Data/Context/Params/Param[2]$</AlertParameter4>
<AlertParameter5>$Data/Context/Params/Param[6]$</AlertParameter5>
<AlertParameter6>$Data/Context/Params/Param[1]$</AlertParameter6>
<AlertParameter7>$Data/Context/Params/Param[7]$</AlertParameter7>
<AlertParameter8>$Data/Context/Params/Param[8]$</AlertParameter8>
<AlertParameter9>$Data/Context/Params/Param[9]$</AlertParameter9>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="FirstEventRaised" MonitorTypeStateID="FirstEventRaised" HealthState="Warning"/>
<OperationalState ID="SecondEventRaised" MonitorTypeStateID="SecondEventRaised" HealthState="Success"/>
</OperationalStates>
<Configuration>
<FirstComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</FirstComputerName>
<FirstLogName>DFS Replication</FirstLogName>
<FirstExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4004</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">DFSR</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[1]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/Property[Type="Microsoft.Windows.FileServer.DFSR.ReplicatedFolder"]/ReplicatedFolderGUID$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</FirstExpression>
<SecondComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</SecondComputerName>
<SecondLogName>DFS Replication</SecondLogName>
<SecondExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">DFSR</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1004</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1104</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[1]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/Property[Type="Microsoft.Windows.FileServer.DFSR.ReplicatedFolder"]/ReplicatedFolderGUID$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4002</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4008</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4010</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4114</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
</And>
</Expression>
<Expression>
<And>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">9008</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">9111</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[3]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/Property[Type="Microsoft.Windows.FileServer.DFSR.ReplicatedFolder"]/ReplicatedFolderGUID$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Or>
</Expression>
</And>
</SecondExpression>
</Configuration>
</UnitMonitor>