Windows Server:錯誤 4012 出現在 Active Directory 網域控制站的 DFS 複寫事件記錄中

Summary: 如果 Active Directory 網域控制站 (DC) 長時間無法從合作夥伴複製 SYSVOL 資料,SYSVOL 複製將會停止。發生這種情況時,受影響 DC 的分散式檔案系統複製 (DFSR) 事件日誌中會記錄錯誤 4012。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

錯誤 4012 (來源:DFSR) 會出現在 DC 的 DFSR 事件記錄中。事件說明包含 SYSVOL 資料夾路徑,如下所示:

The DFS Replication service stopped replication on the folder with the following local path: C:\Windows\SYSVOL\domain. This server has been disconnected from other partners for n days, which is longer than the time allowed by the MaxOfflineTimeInDays parameter (60). DFS Replication considers the data in this folder to be stale, and this server will not replicate the folder until this error is corrected.

[The rest of the event description has been omitted.]

本機路徑可能會有所不同,但 本文僅適用於提及 SYSVOL 資料夾的情況。在上述範例中, n 表示 DC 無法聯絡合作夥伴的天數。此數位會有所不同,但始終大於 MaxOfflineTimeInDays

Cause

分散式檔案系統複製 (DFSR) 要求複製合作夥伴處於常規通信狀態。如果伺服器長時間無法與夥伴通信,則會在該伺服器上禁用複製。

MaxOfflineTimeInDays的預設值為 60,表示伺服器之間失去通信的最長允許時間。這類似於 Active Directory 樹系的標記存留期,但又是分開的。

Resolution

注意:忽略事件說明中表示要從複製組中刪除伺服器並重新添加它的部分。在處理 SYSVOL 複製時,這不是正確的程序。


案例 1:網域中只有一個 DC。

如果網域中只有一個 DC,則需要 SYSVOL 的授權同步,以確保在新增另一個 DC 時能進行複寫。請參閱 如何使用分散式檔案系統複寫 (DFSR) 執行 SYSVOL 資料的授權同步 ,以瞭解所涉及的步驟。可以跳過提及其他DC或強制複製的任何步驟。


案例 2:網域中有多個 DC。

如果網域中有多個 DC,則必須判斷受此問題影響的 DC 數量。請在 DC 的 DFSR 事件記錄中搜尋錯誤 4012。所有受影響的DC在其最近的日誌中都有此錯誤。

  • 如果只有一個 DC 受到影響,請在該 DC 上執行非授權的 SYSVOL 同步。請參閱如何使用分散式檔案系統複寫 (DFSR) 執行 SYSVOL 資料的非授權同步 ,以瞭解所涉及的步驟。
  • 如果有多個 DC 受到影響,但有其他 DC 不受影響,請在所有受影響的 DC 上執行非授權的 SYSVOL 同步。
  • 如果網域中的所有 DC 都受到影響,則必須選擇一個 DC 作為 SYSVOL 資料的權威來源。這需要檢查每個 DC 的 SYSVOL 資料夾階層中的資料,並判斷哪個複本是最新的。選擇授權的來源後,請在該 DC 上執行 SYSVOL 的授權同步。有關步驟的連結,請參閱上面的方案 1。執行程序的所有步驟,以便在網域中的所有 DC 上同步 SYSVOL。

Additional Information

在多 DC 網域中,也可以透過增加 MaxOfflineTimeInDays。此功能尚未經過廣泛測試,但已在多個案例中解決問題。要設定 MaxOfflineTimeInDays,執行此命令:

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

x 的值必須大於錯誤 4012 中指示的天數。運行命令后重新啟動 DFS 複製服務,並檢查 DFS 複製事件日誌中是否存在錯誤。如果複製失敗一段時間,則有關衝突檢測和解決的事件是預期的。這表示 DFSR 正在依設計運作。

複製恢復后,再次運行該命令,值為 60 以返回 MaxOfflineTimeInDays 到其預設值。(這是選用的。)

Affected Products

Microsoft Windows Server 2016, Microsoft Windows Server 2019, Microsoft Windows Server 2022, Microsoft Windows Server 2025

Products

PowerEdge R250, PowerEdge R260, PowerEdge R350, PowerEdge R360, PowerEdge R450, PowerEdge R550, PowerEdge R650, PowerEdge R650xs, PowerEdge R6515, PowerEdge R6525, PowerEdge R660, PowerEdge R660xs, PowerEdge R6615, PowerEdge R6625, PowerEdge R750 , PowerEdge R750XA, PowerEdge R750xs, PowerEdge R7515, PowerEdge R7525, PowerEdge R760, PowerEdge R760XA, PowerEdge R760xd2, PowerEdge R760xs, PowerEdge R7615, PowerEdge R7625, PowerEdge R860, PowerEdge R960, PowerEdge T140, PowerEdge T150, PowerEdge T160, PowerEdge T340, PowerEdge T350, PowerEdge T360, PowerEdge T440, PowerEdge T550, PowerEdge T560, PowerEdge T640 ...
Article Properties
Article Number: 000218367
Article Type: Solution
Last Modified: 28 Apr 2025
Version:  6
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.