DFSR error 4012

24 November 2019 Off By Rached CHADER

Problem

In the Windows event log you have a 4012 error:

The DFS Replication service stopped replication on the folder to the following local path: C:\Windows\SYSVOL\domain. This server was disconnected from the other partners for a period of 690 days, which is a longer period than allowed by the MaxOfflineTimelnDays (60) parameter. DFS Replication considers the data in this folder as stale. This server will not replicate folder until this error is corrected.

This error usually comes from a replication problem on the controllers

Resolution

On each server, open a command prompt in Administrator and enter the following command:

1
wmic.exe /namespace:\\root\microsoftdfs path DfsrMachineConfig set MaxOfflineTimeInDays=800

MaxOfflineTimeInDays Must be greater than the non-sync period.

Changing the registry key on each Controller:

1
HLM\SYSTEM\CURENTCONTROLSET\SERVICES\DFSR\PARAMETERS\STOPREPLICAtiononautorecovery = 0

Open a command prompt in Administrator on each controller and enter the following command:
Net Stop Dfsr
Net Start Dfsr

Once the synchronization is complete, do not forget to put the value of MaxOfflineTimeInDays = 60

Open a command prompt in Administrator on each controller and enter the following command:
Net Stop Dfsr
Net Start Dfsr

Visits: 3682