Troubleshooting Active Directory Replication Errors
Troubleshooting Active Directory Replication Errors
Troubleshooting Active Directory Replication Errors
Troubleshooting Troubleshooting
Active Directory
Replication Errors Hands-on lab
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter
in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document
does not give you any license to these patents, trademarks, copyrights, or other intellectual property.
Microsoft, Hyper-V, Windows PowerShell, and Windows Server are trademarks of the Microsoft group of companies.
Acknowledgments
Bio Justin is a Support Topic Lead and Senior Support Escalation Engineer with the Identity
(Directory Services) team based in Irving, Texas, USA. He has created or contributed to
many training courses, knowledge base and TechNet articles for Microsoft over the
past 13 years. He teaches Microsoft employees and customers new product
architecture, is a charter Microsoft Certified Master (MCM), Microsoft Certified
Trainer (MCT) and holds an M.S. degree in Computer Education and Cognitive Systems
(Instructional Systems Design).
Research This lab includes research by the following: Ken Brumfield, Arren Conner, John
Kuehler, Glenn LeCheminant, Herbert Mauerer, Joey Seifert, Chris Simpkiss and Justin
Turner
Reviewers Many thanks to the following individuals that spent their own time reviewing and
providing feedback: Chad Duffey, Ken Brumfield, Wayne McIntyre, Rob Lane, John Wu,
Jack Poehlman, Bryan Debnam, Bryan Zink, Mike Yock, Richard Leung, Milan Tresnak
and Ashley McGlone
Troubleshooting Active Directory Replication Errors
Introduction
Estimated time to complete this lab
75 minutes
Objectives
After completing this lab, you will be able to:
Troubleshoot and resolve five of the most common Active Directory (AD) replication errors.
Analyze replication metadata using ADREPLSTATUS, repadmin and configuration settings
in order to diagnose replication failures.
Use troubleshooting tools to identify configuration problems or failures in AD Replication
dependencies: DNS, RPC, LDAP & Kerberos.
Prerequisites
Before working on this lab, you must have an understanding of the following:
Active Directory logical model
Active Directory replication model
o Active Directory replication concepts
o Active Directory replication topology
Basic DNS concepts
Basic Kerberos concepts
However, detailed step-by-step instructions are included, so those new to Active Directory
replication troubleshooting will be able to follow along.
The appendix contains a lot more detail, background information, sample log output,
More: references and information on how to reproduce the issues in a lab. Ensure you save
off the document for later reference.
Page | 3
Troubleshooting Active Directory Replication Errors
Scenario
Active Directory replication problems are one of the top support call generators for
Microsoft. AD replication failures cause innumerous problems in other applications and
services that rely on the consistency of the data stored in Active Directory. This lab
presents five of the most commonly encountered AD replication problems.
Page | 4
Troubleshooting Active Directory Replication Errors
Page | 5
Troubleshooting Active Directory Replication Errors
Exercise setup:
Manually initiate replication on DC1 from all replica DCs using one of the following
methods.
Repadmin /syncall DC1 /Aed
Using DSSITE.msc
On a per-partition, per source DC basis
Repadmin /replicate DC1 DC2 "dc=root,dc=contoso,dc=com"
Page | 6
Troubleshooting Active Directory Replication Errors
If the above command returns data proceed to step 3. If it fails with an LDAP error
Important:
82, do the following:
Switch to DC2 and pause the virtual machine by selecting Pause from the
holSystems Launchpad
Switch to Win8Client and attempt to bind to DC1 again:
Repadmin /bind dc1
When this completes and returns data, switch back to DC2 and click Resume
The above steps may be necessary if Win8Client uses DC2 for KDC operations. For this
task, we need the client to use DC1 as a KDC since DC2 has been intentionally broken
for a later exercise. The issue with DC2 is resolved in exercise 2.
3. On Win8Client, double click the AD Replication Status Tool 1.0 shortcut on the desktop.
4. Within the AD Replication Status Tool, click Refresh Replication Status.
The tool will take one to two minutes to check the AD replication status.
You will know data collection is complete when the Status: prompt changes from
Running to Ready and the focus is switched to the Replication Status Viewer tab.
Note that replication status is reported for three DCs, but there are actually five DCs
in the forest. You will see why replication status is missing from two DCs in the next
step.
5. The Configuration/Scope Settings tab displays the results of the data collection.
Click the Configuration/Scope Settings tab.
The Replication Status Collection Details pane lists all DCs in which the tool was
able to collect data.
o Review the Environment Discovery tab for any errors.
o Take note there is an error for child.root.contoso.com.
o The Discovery Missing Domain Controllers tab notes that NTDS Settings
objects exist but since discovery failed for the child domain, the tool was
unable to collect data from these DCs: ChildDC1 and ChildDC2. This issue is
resolved in Exercise 3.
Page | 7
Troubleshooting Active Directory Replication Errors
When refreshing replication status on future runs of the tool, ensure you select the
Important: Re-Discover Environment option so it will attempt to collect data from the child
domain DCs.
6. Click the Replication Status Viewer tab, and then select Errors Only.
Errors currently reported in the environment: -2146893022, 1908, 1256 and 8606
If error 8614 is observed, you will need to perform the steps in Exercise 6 at some
Note: point in the lab.
Page | 8
Troubleshooting Active Directory Replication Errors
Page | 9
Troubleshooting Active Directory Replication Errors
Repadmin /?:showrepl
Note: "Displays the replication status when specified domain controller last attempted to
inbound replicate Active Directory partitions.
Status is reported for each source DC that the destination has an inbound connection
object from, grouped by partition. SHOWREPL helps administrators understand the
replication topology and replication failures.
The REPADMIN console must have RPC network connectivity to all DC's targeted by
the DCLIST parameter."
Use the Repadmin /showrepl command to display replication status for one or more DCs
specified with the DSA_LIST parameter. Use Repadmin /listhelp from a command prompt,
or see this section in the appendix for details about DSA_LIST options.
Repadmin /showrepl usage examples:
Return replication status for DC1:
Repadmin /showrepl DC1
Return replication status for all DCs that reside in the Boulder site:
Repadmin /showrepl site:Boulder
Return replication status for all DCs in the forest and output to a CSV format into a
file called showrepl.csv:
Repadmin /showrepl * /csv >showrepl.csv
1. Open a command prompt and type the following command, and then press ENTER:
repadmin /showrepl * /csv >showrepl.csv
2. Take note of any errors reported on-screen. You will typically see an LDAP error 81 for
any DC the tool is unable to collect replication results. Since two LDAP errors are displayed
on screen, we failed to collect data from two DCs. (this is due to an issue you will resolve in
Exercise 3)
3. At the command prompt, type showrepl.csv to open the showrepl.csv file in Microsoft Excel
4. Within Microsoft Excel: from the Home menu, click Format as Table in the Styles section
and click any of the table designs.
5. Hide column A and column G, by right clicking the column headers and select Hide
Page | 10
Troubleshooting Active Directory Replication Errors
6. Reduce the width of other columns so that column K, Last Failure Status is visible.
7. In the Last Failure Time column, click the down arrow and deselect 0
This filters the spreadsheet so just the replication errors are displayed.
Repldiag.exe (available from CodePlex) can also be used to create an Excel importable
More: XML file with this information.
It is a good idea to view an unfiltered report initially to see both what is working and not
working. To filter the output to just replication errors:
2. Select Add criteria and check Last Failure Status. Select Add.
3. From the "and Last Failure Status contains" filter criteria, select the blue-underlined word
"contains" and select does not equal. Type 0 in the text box.
Page | 11
Troubleshooting Active Directory Replication Errors
When did DC1 last successfully replicate the ROOT partition from DC2?
Page | 12
Troubleshooting Active Directory Replication Errors
Why is time important to Active Directory? It's not just about Kerberos and
Trends: authentication.
AD replication errors -2146893022, 8614 and 8606 routinely go hand in hand. When
all are seen together (or at least the first two), it is a good indicator that the domain
controller's time changed by greater than tombstone lifetime.
Consider:
Machine account passwords change every 30 days by default
Tombstone Lifetime is usually 60 or 180 days
For more info: see "Fixing When Your Domain Traveled Back In Time, the Great System
Time Rollback to the Year 2000" article linked to in the References section.
Scenario
DC2 is failing to replicate from DC1 with error -2146893022, "the target principal
name is incorrect".
You will use DC1 and DC2 in this exercise.
Task 1 - Use repadmin and the system event log to see the
symptoms of this problem
1. Use one of the methods from exercise 1 to review the replication status for DC1. Verify the
last replication status result from DC2 lists error -2146893022 / the target principal name
is incorrect.
Output from repadmin /showrepl DC2:
Page | 13
Troubleshooting Active Directory Replication Errors
DC=root,DC=contoso,DC=com
Page | 14
Troubleshooting Active Directory Replication Errors
Among other things, the text of event ID 4 indicates the problem can be caused by, "the
target service account password is different than what is configured on the Kerberos Key
Distribution Center for that target service".
For this scenario, that means:
DC1s computer account password is different than the password stored in AD for
DC1 on the KDC (DC2)
Page | 15
Troubleshooting Active Directory Replication Errors
How you can quickly identify if attributes on a given object are the same on a given set
Tip: of DCs: repadmin /showobjmeta
The /showobjmeta parameter is used to display the replication metadata for a given
object. If the attribute values of a given object are in-sync amongst DCs, the version
information reported in the output will be the same when compared with the
replication metadata from other DCs.
3. Open up the dc1objmeta.txt file with Notepad.exe and observe the version number
differences for the password related attributes: (dBCSPwd, UnicodePWD, NtPwdHistory,
PwdLastSet and lmPwdHistory). The version number is the second to last column with the
heading of "Ver".
Table 1: dc1objmeta.txt -partial repadmin /showobjmeta output of DC1's computer object
DC1 19 dBCSPwd
DC2 11 dBCSPwd
The replication metadata reveals that DC2 has old password information for DC1. The
Kerberos operation failed because DC1 was unable to decrypt the Service Ticket presented
by DC2. Review the Kerberos details section for Exercise 2 in the appendix for more
information.
There is a PowerShell script in the appendix that will help if this issue is encountered in
PowerShell: a larger environment.
Page | 16
Troubleshooting Active Directory Replication Errors
If replication of the root partition was successful, DC2 now has the updated password
information for DC1, so DC2 can now be used for KDC operations. You can confirm this if
you like by running the two repadmin /showobjmeta commands from task 2.
3. Start the Kerberos Key Distribution Center service on DC2.
Net start kdc
The command instructs DC1 to change its password and tell the DC specified with the
/server parameter the new password.
Page | 17
Troubleshooting Active Directory Replication Errors
Scenario
DC1, DC2 and TRDC1 are failing to replicate from ChildDC1 with error 1908 "Could
not find the domain controller for this domain".
o This error is returned when there is a failure by Netlogon to locate a DC that
is advertising the KDC flag.
Perform the following steps from DC1.
This enables additional detail to be logged to the Netlogon.log file located in the
C:\Windows\Debug directory.
2. On DC1, initiate replication from ChildDC1
repadmin /replicate dc1 childdc1 dc=child,dc=root,dc=contoso,dc=com
DSReplicaSync() failed with status 1908 (0x774):
Could not find the domain controller for this domain.
3. From DC1, test Netlogon's ability to locate a KDC in the child.root.contoso.com domain
Nltest /dsgetdc:child /kdc
Getting DC name failed: Status = 1355 0x54b ERROR_NO_SUCH_DOMAIN
4. Execute the same command without the /KDC option to see if Netlogon can find any DC in
the child domain
Page | 18
Troubleshooting Active Directory Replication Errors
Nltest /dsgetdc:child
"Getting DC name failed: Status = 1355 0x54b ERROR_NO_SUCH_DOMAIN"
5. You will now review the netlogon.log file to see what was logged upon the execution of the
first nltest command.
b. Look for the entry that begins with DSGetDcName function called.
There will be multiple similar entries. Find the entry in the log that has the same
parameters you specified in the first nltest command. (Dom:child and Flags: KDC)
If you have trouble locating the call, place your cursor on the last line of text and search
up for KDC.
Page | 19
Troubleshooting Active Directory Replication Errors
date 12:21:50 CRITICAL 3372 NetpDcGetName: child.root.contoso.com: IP and Netbios are both
done.
date 12:21:50 MISC 3372 ROOT: DsGetDcName function returns 1355 (client PID=2176):
Dom:child Acct:(null) Flags: KDC
In the Netlogon log output, you can see a DNS lookup failure for a KDC SRV record in the
Child domain.
How do the domain controllers in root.contoso.com resolve names for the Child
domain? (Open up the DNS management snap-in in order to determine the answer)
Are there any failures reported for the DNS delegation test?
What is the cause of the failure to locate a KDC in the child domain?
Page | 20
Troubleshooting Active Directory Replication Errors
b. In the Server fully qualified domain name (FQDN) text box, type:
childdc1.child.root.contoso.com
c. In the IP Addresses of this NS record section, type the IP address of ChildDC1:
192.168.10.11
d. Select OK and then select OK again.
e. Select Yes to the dialogue window that opens up asking if you want to delete the
glue record lamedc1.child.contoso.com [192.168.10.1]
6. Now use nltest to verify we are able to locate a KDC in the child domain.
Nltest /dsgetdc:child /kdc /force
The /force option is used to ensure the Netlogon cache is not used.
7. Test AD replication (replicate from childdc1 to dc1 and dc2) now that you have corrected
the DNS delegation.
Initiate replication using repadmin.exe OR via AD Sites and Services
Initiate replication using repadmin:
Repadmin /replicate dc1 childdc1 "dc=child,dc=root,dc=contoso,dc=com"
Initiate replication on DC1 from CHILDDC1 using Active Directory Sites and Services:
Page | 21
Troubleshooting Active Directory Replication Errors
Page | 22
Troubleshooting Active Directory Replication Errors
9. Observe that you now have replication status from the child domain DCs. At this point, the
only replication error displayed is error 8606.
Note that error 1256 is no longer displayed. This was cleared up by resolving the first
Note: set of errors. Error 1256 is logged when the replication task is cancelled after a failure
to replicate the Schema, configuration, or domain partitions for other replication
errors. For this reason, you should always troubleshoot the error that led to the
replication task being cancelled (do not bother troubleshooting 1256).
Page | 23
Troubleshooting Active Directory Replication Errors
This section is jargon intense, a Lingering Object Glossary is provided in the Appendix
Tip: for your reference.
Lingering object: An object that is present on one DC, but has been deleted and
More: garbage collected on one or more DCs. Error 8606 is logged when the source DC sends
an update of one or more attributes for an object that does not exist on the
destination DC.
Scenario
AD replication of the Root partition from DC2 to DC1 fails with error, "Insufficient
attributes were given to create an object".
AD replication of the Root partition from TRDC1 to other GCs hosting a read-only
copy of the partition fail with the same error.
Page | 24
Troubleshooting Active Directory Replication Errors
DC2 and TRDC1 are DCs that have at least one lingering object in the
root.contoso.com partition
DC1 reports error 8606 replicating from DC2
There are many methods to remove lingering objects. This exercise presents the two
More: most common:
Repldiag /removelingeringobjects
Repadmin /removelingeringobjects
Other methods are listed in the appendix.
Page | 25
Troubleshooting Active Directory Replication Errors
2. Review the Directory Services event log on DC1 for event 1988 using event viewer
(eventvwr.msc) or PowerShell
Event 1988 only reports the first lingering object encountered during the replication
Note: attempt. There are usually many more lingering objects present on the source DC.
Use repadmin /removelingeringobjects with the /advisory_mode switch to have all
lingering objects reported.
Page | 26
Troubleshooting Active Directory Replication Errors
3. Identify the following from event 1988 (they are needed later in the exercise):
Object GUID
Source DC
Partition DN
How can you translate the DNS alias provided in the event to the host name of the DC?
3. Open obj.txt. Any DC that returns replication metadata for this object are DCs containing
one or more lingering objects. DCs that do not have a copy of the object report status 8439,
"The distinguished name specified for this replication operation is invalid".
This is a good method to conduct a quick spot check of DCs containing the lingering
Important: object reported in the event. It is NOT a good method to discover all lingering objects.
For more information, see the Lingering Object discovery section of the appendix.
4. Obtain DC1's DSA ObjectGUID and use repadmin /removelingeringobjects with the
/advisory_mode parameter to identify all lingering objects in the ROOT partition on DC2.
In order to use the /removelingeringobjects command you need to know three things:
Note: 1. You need to know which DCs contain lingering objects
2. Which partition the lingering object resides in
3. The DSA Object GUID of a good reference DC that hosts that partition that does not
contain lingering objects
Page | 27
Troubleshooting Active Directory Replication Errors
The DSA object GUID is at the top of the output and will look like this:
DSA object GUID: 70ff33ce-2f41-4bf4-b7ca-7fa71d4ca13e
b. In the following command, you will verify the existence of lingering objects on DC2
by comparing its copy of the ROOT partition with DC1.
Run the following repadmin command (ensure you use the /advisory_mode
parameter)
Repadmin /removelingeringobjects DC2 70ff33ce-2f41-4bf4-b7ca-7fa71d4ca13e
"dc=root,dc=contoso,dc=com" /Advisory_Mode
RemoveLingeringObjects successful on dc2.
c. Review the Directory Service event log on DC2. If there are any lingering objects
present, each one will be reported in its own event ID 1946. The total count of
lingering objects for the partition checked is reported in event 1942.
You will run commands to remove lingering objects from all partitions even though only
one lingering object was discovered in the prior task.
When lingering objects are discovered, assume they are present on all DCs in all
Important: partitions. Do not just clean up the DCs reporting the errors. Repldiag automates the
majority of the cleanup work. See the Lingering Object discovery and cleanup section
in the appendix for more information.
Page | 28
Troubleshooting Active Directory Replication Errors
3. Rerun the repadmin /showobjmeta command executed in Task 2 to see if the object was
removed from all DCs
Repadmin /showobjmeta * "<GUID=5ca6ebca-d34c-4f60-b79c-e8bd5af127d8>" >obj.txt
Notice the RODC in the child domain still contains the object.
At the time of this writing, Replidag (v 2.0.4947.18978) does not remove lingering
Note: objects from RODCs. (It was developed prior to the existence of RODCs.) This
functionality has been requested.
5. Review the Directory Service event log on ChildDC2 for the results of the lingering
object removal request. Since this server runs a minimal server interface, you will need
to open Event Viewer from the command prompt by typing eventvwr.msc.
Review the details of event ID 1939, which reports the status of the lingering
object removal process.
Page | 29
Troubleshooting Active Directory Replication Errors
If this were a production environment, you would also run the repadmin
Note: /removelingeringobjects command for the remaining partitions on the RODC(s).
If you used repldiag to remove the lingering objects, you are done with this task, and do not
need to perform the alternate task steps.
Alternate task steps
Repadmin (method)
Use these steps if you prefer to remove the lingering objects using repadmin.
1. Clean up the reference DCs first
Configuration partition
Repadmin /removelingeringobjects childdc1.child.root.contoso.com 70ff33ce-2f41-4bf4-
b7ca-7fa71d4ca13e "cn=configuration,dc=root,dc=contoso,dc=com"
Page | 30
Troubleshooting Active Directory Replication Errors
ForestDNSZones partition
Repadmin /removelingeringobjects childdc1.child.root.contoso.com 70ff33ce-2f41-4bf4-
b7ca-7fa71d4ca13e "dc=forestdnszones,dc=root,dc=contoso,dc=com"
Repadmin /removelingeringobjects childdc1.child.root.contoso.com 3fe45b7f-e6b1-42b1-
bcf4-2561c38cc3a6 "dc=forestdnszones,dc=root,dc=contoso,dc=com"
Repadmin /removelingeringobjects childdc1.child.root.contoso.com 0b457f73-96a4-429b-
ba81-1a3e0f51c848 "dc=forestdnszones,dc=root,dc=contoso,dc=com"
You do not need to clean up reference DCs for the Child, TreeRoot or their
Note: DomainDNSZones partitions. This is because there is only one DC in each domain that
hosts a writable copy of the partition. The schema partition is not checked or cleaned
up because you cannot delete objects from the schema.
2. Now that the reference DCs are cleaned up. Clean up all remaining DCs against the
reference DCs
Configuration
Repadmin /removelingeringobjects dc1.root.contoso.com 0c559ee4-0adc-42a7-8668-
e34480f9e604 "cn=configuration,dc=root,dc=contoso,dc=com"
Repadmin /removelingeringobjects dc2.root.contoso.com 0c559ee4-0adc-42a7-8668-
e34480f9e604 "cn=configuration,dc=root,dc=contoso,dc=com"
Repadmin /removelingeringobjects childdc2.child.root.contoso.com 0c559ee4-0adc-42a7-
8668-e34480f9e604 "cn=configuration,dc=root,dc=contoso,dc=com"
ForestDNSZones
Page | 31
Troubleshooting Active Directory Replication Errors
DomainDNSZones - Root
Repadmin /removelingeringobjects dc2.root.contoso.com 70ff33ce-2f41-4bf4-b7ca-
7fa71d4ca13e "dc=domaindnszones,dc=root,dc=contoso,dc=com"
DomainDNSZones - Child
Repadmin /removelingeringobjects childdc2.child.root.contoso.com 0c559ee4-0adc-42a7-
8668-e34480f9e604 "dc=domaindnszones,dc=child,dc=root,dc=contoso,dc=com"
Page | 32
Troubleshooting Active Directory Replication Errors
Page | 33
Troubleshooting Active Directory Replication Errors
Scenario
There is an RODC in the Child domain ChildDC2 that is not advertising as a global
catalog server.
Page | 34
Troubleshooting Active Directory Replication Errors
3. Review the Directory Service event log on ChildDC2 for event 1926. It shows the partition
we failed to establish a replication link with and the error in the Additional Data section.
4. From ChildDC2 run the DCDIAG test that checks for security related problems:
Dcdiag /test:checksecurityerror
Page | 35
Troubleshooting Active Directory Replication Errors
As reported in the output, error 8453 is because the Enterprise Read-only Domain
Controllers security group does not have the "Replicating Directory Changes" permission.
This access control entry is added during the RODCPREP process. Sometimes the
More: infrastructure master for a given domain is not available when the command executes,
and the entry is never added. RODCs must have this permission in order to replicate
the partition.
Another common scenario where you encounter this error:
An administrator manually initiates AD replication: Error 8453 is displayed when
attempting to initiate replication from a DC in another domain for which we do not
have the "replicating directory changes" control access right. This is not actually an AD
replication failure; it is just a failure on the Admin initiated operation. The Enterprise
Administrators group has this right by default, and will not see this error.
Page | 36
Troubleshooting Active Directory Replication Errors
8. In the Permissions for Enterprise Read-only Domain Controllers dialog box, clear the
Allow boxes that are automatically checked:
Page | 37
Troubleshooting Active Directory Replication Errors
Read
Read domain password & lockout policies
Read Other domain parameters
9. Select the Allow box next to "Replicating Directory Changes" and then click OK.
10. Manually initiate the KCC to immediately recalculate the inbound replication topology on
ChildDC2 (this will force it to attempt to add the TreeRoot partition again).
Repadmin /kcc childdc2
The next exercise is optional and the lab environment likely does not have the issue.
More:
Page | 38
Troubleshooting Active Directory Replication Errors
Please click the "Exit Lab Environment" button once you have completed all exercises
to your liking. Ensure you save a copy of the manual for later reference and please
take the the survey as it won't be available at a later time, and we really value your
feedback.
Page | 39
Troubleshooting Active Directory Replication Errors
This exercise is needed only if error 8614 is logged in showrepl or adreplstatus output.
Important:
Error 8614 is logged when a destination DC has not replicated with a source DC over an existing
replication connection for longer than tombstone lifetime.
In this exercise, you will use repadmin to resolve AD replication error 8614 in a supported manner.
Perform this exercise from Win8Client.
1. Run the AD Replication Status tool or repadmin /showrepl * /csv. Review the output. If AD
replication error 8614 is not present, then do not do this exercise.
In the output of the above command, verify status for all DCs: registry key set
"Strict Replication Consistency" REG_DWORD 0x0000001 (1)
Page | 40
Troubleshooting Active Directory Replication Errors
3. Remove lingering objects if present using repldiag (skip if already performed in exercise 4).
Repldiag /removelingeringobjects
4. Run the following command on destination DCs that fail to replicate from source DCs with
error 8614: (replace DestinationDCName with the actual DC name)
Do not run the following command without first verifying that Strict replication
Do Not: consistency is enabled.
In this lab environment, it is safe to just temporarily set the registry value on all DCs
Repadmin /regkey * +AllowDivergent
5. Initiate replication to all destination DCs from all source DCs where replication failed with
status 8614
6. Use repadmin /showrepl * /csv or the AD Replication Status tool to verify error 8614 is no
longer logged in the environment
7. Delete the registry value so that the replication quarantine safeguards are back in place
Repadmin /regkey * -AllowDivergent
Page | 41
Troubleshooting Active Directory Replication Errors
Appendix
Exercise 1: AD replication symptom identification
Answers
When did DC1 last successfully replicate the ROOT partition from DC2?
Use
DC1 holds all FSMO roles and has recently restarted.
What impact do the current AD replication failures on DC1 have on the environment?
Page | 42
Troubleshooting Active Directory Replication Errors
Repadmin /listhelp
DSA_LIST = { <DSA_NAME> | * | <part_server_name>* | site:<SITE_NAME>
| gc: | nc: | pnc: | mnc: | fsmo_<FSMO_TYPE>:<FSMO_DN> }
Examples:
"*" = All DSAs in the enterprise/forest/configuration set.
"part_server_name*" = would pick "part_server_name_dc_01" and "part_server_name_dc_02" but
not server "part_server_diff_name".
"site:east_site1" = All DSAs in site "east_site1".
"gc:" = All GCs in the enterprise.
"nc:DC=fabrikam,..." = All DSAs hosting DC=fabrikam,...
"pnc:DC=fabrikam,..." = All DSAs hosting a partial copy of DC=fabrikam,...
"mnc:DC=fabrikam,..." = All DSAs hosting a master copy of DC=fabrikam,...
"fsmo_pdc:DC=my-corp-dom,DC=com" - repadmin runs against the PDC in the NC "DC=my-corp-
dom,DC=com"
"fsmo_istg:east_site1" would pick the ISTG for the east_site1 site.
Page | 43
Troubleshooting Active Directory Replication Errors
server_obj_rdn = specifies a server by its server object rdn (usually the same as its NetBios
name)
The "$service_short_name" is not necessarily needed, but the DSA will only find a server, if the
portion of the server_obj_rdn specified in unambiguous.
dsa_dn = specifies a server by the DN of its DSA object.
NOTES:
o The * in wildcards are evaluated by LDAP.
o Some options are not valid in AD LDS such as "gc:", "fsmo_pdc:", "fsmo_rid", "domain:", etc
Page | 44
Troubleshooting Active Directory Replication Errors
Kerberos details
Operation AD replication attempt from DC1 to DC2 fails with -2146893022
Kerberos client DC2
Kerberos target DC1
KDC DC2
This replication error occurs because the source DC (DC1 - Kerberos target) failed to
verify the AP request that DC2 sent. Specifically, the source DC (DC1) attempted to
decrypt the service ticket in the AP request and failed.
The Service Ticket was encrypted by the KDC (DC2) with the password hash of the
DC1s computer account stored in AD (the KDCs version of the password).
The Service Ticket decryption takes place on the Kerberos target (DC1). It attempts
to decrypt the ticket with its actual password (which differs from what is stored in
AD on the KDC).
Since the Service Ticket was encrypted with the wrong computer account password,
the operation fails.
AND
Kerberos for the busy admin
http://blogs.technet.com/b/askds/archive/2008/03/06/kerberos-for-the-busy-
admin.aspx
Page | 45
Troubleshooting Active Directory Replication Errors
Troubleshooting
Repadmin /bind dc2
Operation
Kerberos client Win8Client
Kerberos target DC2
KDC DC1
Page | 46
Troubleshooting Active Directory Replication Errors
Figure 4 Network trace with Netmon 3.4 Authentication traffic filter applied
Page | 47
Troubleshooting Active Directory Replication Errors
Page | 48
Troubleshooting Active Directory Replication Errors
$report = @()
$report | ogv
Page | 49
Troubleshooting Active Directory Replication Errors
Answers
How do the domain controllers in root.contoso.com resolve names for the child
domain?
Via DNS delegation - the Child domain zone is delegated to a different DNS server
Are there any failures reported for the DCDIAG DNS delegation test?
Yes:
DC1
TEST: Delegations (Del)
Error: DNS server: lamedc1.child.contoso.com.
IP:192.168.10.1
[Broken delegated domain child.root.contoso.com.]
Does a server named lamedc1.child.contoso.com server exists that hosts the
child.root.contoso.com DNS zone?
No. Also, the IP address 192.168.10.1 belongs to DC1.
What is the cause of the failure to locate a KDC in the child domain?
Netlogon attempts to locate a KDC by querying a KDC SRV DNS record. Netlogon fails to
get a response to this DNS query. Ultimately this is caused by a broken DNS delegation.
Log output
nltest /dsgetdc:child /kdc
Getting DC name failed: Status = 1355 0x54b ERROR_NO_SUCH_DOMAIN
Netlogon.log
Page | 50
Troubleshooting Active Directory Replication Errors
12/18 11:05:59 [MISC] [1856] ROOT: DsGetDcName function called: client PID=-1,
Dom:CHILD.ROOT.CONTOSO.COM Acct:(null) Flags: IP KDC
12/18 11:05:59 [MISC] [1856] NetpDcInitializeContext: DSGETDC_VALID_FLAGS is c07ffff1
12/18 11:05:59 [MAILSLOT] [1856] Received ping from DC1(DC1.root.contoso.com)
CHILD.ROOT.CONTOSO.COM (null) on <Local>
12/18 11:05:59 [CRITICAL] [1856] Ping from DC1 for domain CHILD.ROOT.CONTOSO.COM
(null) for (null) on <Local> is invalid since we don't host the named domain.
12/18 11:06:06 [MISC] [624] ROOT: DsGetDcName function called: client PID=-1,
Dom:CHILD.ROOT.CONTOSO.COM Acct:(null) Flags: IP KDC
12/18 11:06:06 [MISC] [624] NetpDcInitializeContext: DSGETDC_VALID_FLAGS is c07ffff1
12/18 11:06:06 [MAILSLOT] [624] Received ping from DC1(DC1.root.contoso.com)
CHILD.ROOT.CONTOSO.COM (null) on <Local>
12/18 11:06:06 [CRITICAL] [624] Ping from DC1 for domain CHILD.ROOT.CONTOSO.COM (null)
for (null) on <Local> is invalid since we don't host the named domain.
12/18 11:06:08 [CRITICAL] [1856] NetpDcGetDcNext:
_kerberos._tcp.Boulder._sites.dc._msdcs.CHILD.ROOT.CONTOSO.COM.: Cannot Query DNS. 9002
0x232a
12/18 11:06:08 [CRITICAL] [1856] NetpDcGetNameIp: CHILD.ROOT.CONTOSO.COM: No data
returned from DnsQuery.
12/18 11:06:08 [MISC] [1856] NetpDcGetName: NetpDcGetNameIp for
CHILD.ROOT.CONTOSO.COM returned 1355
12/18 11:06:08 [CRITICAL] [1856] NetpDcGetName: CHILD.ROOT.CONTOSO.COM: IP and
Netbios are both done.
12/18 11:06:08 [MISC] [1856] ROOT: DsGetDcName function returns 1355 (client PID=-1):
Dom:CHILD.ROOT.CONTOSO.COM Acct:(null) Flags: IP KDC
12/18 11:06:08 [CRITICAL] [624] NetpDcGetDcNext:
_kerberos._tcp.Boulder._sites.dc._msdcs.CHILD.ROOT.CONTOSO.COM.: Cannot Query DNS. 9002
0x232a
12/18 11:06:08 [CRITICAL] [624] NetpDcGetNameIp: CHILD.ROOT.CONTOSO.COM: No data
returned from DnsQuery.
12/18 11:06:08 [MISC] [624] NetpDcGetName: NetpDcGetNameIp for
CHILD.ROOT.CONTOSO.COM returned 1355
12/18 11:06:08 [CRITICAL] [624] NetpDcGetName: CHILD.ROOT.CONTOSO.COM: IP and Netbios
are both done.
12/18 11:06:08 [MISC] [624] ROOT: DsGetDcName function returns 1355 (client PID=-1):
Dom:CHILD.ROOT.CONTOSO.COM Acct:(null) Flags: IP KDC
Network trace
66 DC1 DC2 DNS:QueryId = 0x7A52, QUERY (Standard query), Query for ChildDC1.child.root.contoso.com of type Host Addr on class Internet …
67 DC1 DC2 DNS:QueryId = 0x597F, QUERY (Standard query), Query for _kerberos._tcp.Boulder._sites.dc._msdcs.CHILD.ROOT.CONTOSO.COM of type SRV
68 DC1 DC2 DNS:QueryId = 0x7A52, QUERY (Standard query), Query for ChildDC1.child.root.contoso.com of type Host Addr on class Internet …
71 DC2 DC1 DNS:QueryId = 0x597F, QUERY (Standard query), Response - Server failure {DNS:28, UDP:27, IPv4:1}
79 DC1 DC2 DNS:QueryId = 0x7A52, QUERY (Standard query), Query for ChildDC1.child.root.contoso.com of type Host Addr on class Internet …
84 DC2 DC1 DNS:QueryId = 0x7A52, QUERY (Standard query), Response - Server failure {DNS:32, UDP:31, IPv4:1}
Page | 51
Troubleshooting Active Directory Replication Errors
* Identified AD Forest.
Done gathering initial info.
DNS Tests are running and not hung. Please wait a few minutes...
DC: DC1.root.contoso.com
Domain: root.contoso.com
Page | 52
Troubleshooting Active Directory Replication Errors
Summary of test results for DNS servers used by the above domain
controllers:
Page | 53
Troubleshooting Active Directory Replication Errors
CN=Frankie Fredrick,OU=Engineering,DC=root,DC=contoso,DC=com
Object GUID:
5ca6ebca-d34c-4f60-b79c-e8bd5af127d8 This event is being logged because the source DC contains a lingering object which
does not exist on the local DCs Active Directory Domain Services database. This replication attempt has been blocked.
The best solution to this problem is to identify and remove all lingering objects in the forest.
User Action:
Remove Lingering Objects:
The action plan to recover from this error can be found at http://support.microsoft.com/?id=314282.
If both the source and destination DCs are Windows Server 2003 DCs, then install the support tools included on the
installation CD. To see which objects would be deleted without actually performing the deletion run "repadmin
/removelingeringobjects <Source DC> <Destination DC DSA GUID> <NC> /ADVISORY_MODE". The event logs on the source DC
will enumerate all lingering objects. To remove lingering objects from a source domain controller run "repadmin
/removelingeringobjects <Source DC> <Destination DC DSA GUID> <NC>".
If either source or destination DC is a Windows 2000 Server DC, then more information on how to remove lingering objects
on the source DC can be found at http://support.microsoft.com/?id=314282 or from your Microsoft support personnel.
If you need Active Directory Domain Services replication to function immediately at all costs and don't have time to remove
lingering objects, enable loose replication consistency by unsetting the following registry key:
Registry Key:
HKLM\System\CurrentControlSet\Services\NTDS\Parameters\Strict Replication Consistency
Replication errors between DCs sharing a common partition can prevent user and computer accounts, trust relationships,
their passwords, security groups, security group memberships and other Active Directory Domain Services configuration data
to vary between DCs, affecting the ability to log on, find objects of interest and perform other critical operations. These
inconsistencies are resolved once replication errors are resolved. DCs that fail to inbound replicate deleted objects within
tombstone lifetime number of days will remain inconsistent until lingering objects are manually removed by an administrator
from each local DC.
Lingering objects may be prevented by ensuring that all domain controllers in the forest are running Active Directory Domain
Services, are connected by a spanning tree connection topology and perform inbound replication before Tombstone Live
number of days pass.
Answers
How can you translate the alias provided in the event to the host name of the DC?
1. Copy the alias out of the event (highlight and Ctrl + C)
2. Ping 3fe45b7f-e6b1-42b1-bcf4-2561c38cc3a6._msdcs.root.contoso.com
Other options include:
Look at the SRV record in the forest root MSDCS DNS zone
(_msdcs.root.contoso.com) in the DNS Management snap-in
Output repadmin /showrepl * to a text file and match up the GUID reported in
the event to the DSA object GUID.
Page | 54
Troubleshooting Active Directory Replication Errors
PowerShell:
PS C:\>Get-ADObject -Identity 3fe45b7f-e6b1-42b1-bcf4-2561c38cc3a6
Page | 55
Troubleshooting Active Directory Replication Errors
2. Clean up each DC identified against all other DCs that host a writeable copy of
the same partition. This DC is now considered "clean" and suitable to use as a
reference DC.
3. Clean up all other DCs against the reference DCs
In the simple, five DC, three domain lab environment, this requires 30 separate executions
of the repadmin command. In a real-word production environment, the count of repadmin
executions is usually in the hundreds or thousands.
The good news is that repldiag /removelingeringobjects automates the above for you and
requires just one execution: Repldiag /removelingeringobjects
Term Definition
Page | 56
Troubleshooting Active Directory Replication Errors
Page | 57
Troubleshooting Active Directory Replication Errors
Deleted object When AD recycle bin is enabled, an object that IsDeleted = True
is deleted (deleted object) is recoverable with a IsRecycled = <not set>
full set of attributes using a PowerShell Stored in the Deleted Objects
command (2008 R2) or via PowerShell and a container in most instances (some
GUI- based tool (ADAC) in Windows Server objects do not get moved on deletion).
2012). The object remains in this state until the
deleted object lifetime expires and then it
becomes a recycled object.
Deleted object The deleted object lifetime is determined by the CN=Directory Service,CN=Windows
lifetime value of the msDS-deletedObjectLifetime NT,CN=Services,CN=Configuration,DC=
attribute. <mydomain>,DC=<com>
By default, msDS-deletedObjectLifetime is
also set to null. When msDS-
deletedObjectLifetime is set to null, the
deleted object lifetime is set to the value of
the tombstone lifetime.
If msDS-deletedObjectLifetime is manually
set, it becomes the effective lifetime of a
system state backup.
Garbage A process that permanently deletes tombstone Repadmin /setattr "" ""
objects or recycled objects doGarbageCollection add
Collection 1"
runs on DCs every 12 hours by default /
15 minutes after restart
Can be manually initiated with LDP or other
LDAP tool
Offline defrag Invokes Esentutl.exe to compact the existing AD Access in DS restore mode:
database and writes the compacted file to the Ntdsutil / act in ntds / files / compact
specified directory. to c:\temp
Page | 58
Troubleshooting Active Directory Replication Errors
Tombstone Generically, this is an object that has been If AD recycle bin is not enabled:
deleted but not garbage collected. Prior to the IsDeleted = True
introduction of the AD recycle bin, this is the IsRecycled = True
term for a deleted object.
If AD recycle bin is enabled and the
If AD recycle bin is enabled:
object is within the deleted object
An object that is deleted retains all of its lifetime:
attribute values and does not become a IsDeleted=True
recycled object until the deleted object lifetime IsRecycled=not set
expires.
If AD recycle bin is not enabled: If AD recycle bin is enabled and the
object is now a recycled object:
A deleted object immediately becomes a IsDeleted=True
tombstone and is stripped of most attribute IsRecycled=True
values.
To recover a tombstone with a full set of
attributes, you must perform an authoritative
restore.
Page | 59
Troubleshooting Active Directory Replication Errors
Page | 60
Troubleshooting Active Directory Replication Errors
You can also enable strict replication by manually setting the Strict Replication Consistency
registry value to 1.
Key: HKLM\System\CurrentControlSet\Services\NTDS\Parameter
Value: Strict Replication Consistency
Type: (Reg_DWORD)
Value Data: 1
1(enabled): Inbound replication of the specified directory partition from the source is
stopped on the destination.
Ensure you are prepared to deal with replication failures after enabling strict
Warning:
replication consistency due to the existence of lingering objects.
0 (disabled): The destination requests the full object from the source domain
controller, and the lingering object is revived in the directory.
Page | 61
Troubleshooting Active Directory Replication Errors
Critical: The Loose Replication Consistency setting will cause the undesirable behavior of
reanimation of lingering objects.
Page | 62
Troubleshooting Active Directory Replication Errors
Where:
LingeringDC: FQDN of DC that has the lingering objects
ReferenceDC_DSA_GUID: The DSA GUID of a domain controller that hosts a writeable copy of the partition
Partition: The distinguished name of the directory partition where the lingering objects exist
So for example:
We have a server named DC1.contoso.com that contains lingering objects. We know that the lingering object is in the
childdomain.contoso.com partition. We know that DC3.childdomain.contoso.com hosts a writeable copy of the partition
and doesn't contain any lingering objects.
We need to find the DSA GUID of DC3 is, so we run: repadmin /showrepl DC3.childdomain.contoso.com
At the top of the output, locate the DC Object GUID entry. This is the GUID you need to enter in the command for the
reference DC.
Page | 63
Troubleshooting Active Directory Replication Errors
Reference DC selection:
From the "It is based on the DC with the highest number of link objects on a per partition basis.
developer: The assumption is that this is a hub/well connected system. This may also select a
multiple “reference” DCs according to each partition." - Ken Brumfield
2. It then cleans the reference DCs up against all other DCs for the partition(s) they
were selected as a reference for.
3. Finally, it cleans up all other DCs in the forest with the new “cleaned up”
reference DCs as sources.
The /outputrepadmincommandlinesyntax option does not actually attempt object cleanup.
You would need to leave this option off if you want to execute lingering object cleanup.
Sample Repldiag /removelingeringobjects /outputrepadmincommandlinesyntax output
Number Complete,Status,Server Name,Naming Context,Reference DC,Duration,Error Code,Error
Message
repadmin /removelingeringobjects loncontosodc.contoso.com 9653cb84-7aa2-4a59-ab46-
382e5dc1d3a8 dc=forestdnszones,dc=contoso,dc=com
repadmin /removelingeringobjects loncontosodc.contoso.com 87ccb4f8-1057-4cfa-aed6-
79b5626db9fd dc=forestdnszones,dc=contoso,dc=com
repadmin /removelingeringobjects loncontosodc.contoso.com 4009aef6-b279-43d2-82f6-
4298f02505e8 dc=forestdnszones,dc=contoso,dc=com
repadmin /removelingeringobjects loncontosodc.contoso.com b3ff6e2e-6025-4782-9d7b-
54b0431a374a dc=forestdnszones,dc=contoso,dc=com
repadmin /removelingeringobjects loncontosodc.contoso.com 9653cb84-7aa2-4a59-ab46-
382e5dc1d3a8 cn=configuration,dc=contoso,dc=com
repadmin /removelingeringobjects loncontosodc.contoso.com 87ccb4f8-1057-4cfa-aed6-
79b5626db9fd cn=configuration,dc=contoso,dc=com
repadmin /removelingeringobjects loncontosodc.contoso.com 4009aef6-b279-43d2-82f6-
4298f02505e8 cn=configuration,dc=contoso,dc=com
repadmin /removelingeringobjects loncontosodc.contoso.com b3ff6e2e-6025-4782-9d7b-
54b0431a374a cn=configuration,dc=contoso,dc=com
repadmin /removelingeringobjects 5thwardcorpdc.corp.contoso.com 87ccb4f8-1057-4cfa-aed6-
79b5626db9fd dc=domaindnszones,dc=corp,dc=contoso,dc=com
Page | 64
Troubleshooting Active Directory Replication Errors
Page | 65
Troubleshooting Active Directory Replication Errors
This output can also be viewed in Excel: Copy commands to a text file. Modify the text file to include
only the command portion of the output. Then open up the text file in Excel. (space delimited)
W/console.write line handling the thread synchronization for the output." - Ken
Brumfield
Page | 66
Troubleshooting Active Directory Replication Errors
Other DCs don’t report replication failures with reference DC as the source: filter repadmin
/showrepl * /csv ouput, or use the topology report created by repldiag /save.
repldiag /removelingeringobjects
/overridedefaultreferencedc:"cn=configuration,dc=contoso,dc=com":nycorpdc.corp.contoso.com
/overridedefaultreferencedc:"dc=corp,dc=contoso,dc=com":seacorpdc.corp.contoso.com
/overridedefaultreferencedc:"dc=forestdnszones,dc=contoso,dc=com":5thwardcorpdc.corp.cont
oso.com /outputrepadmincommandlinesyntax
/UseRobustDCLocation
Query every DC for a list of DCs in the forest. This ensures replication instability does not cause
any to be missed. We have had cases where we clean up lingering objects in the forest but due to
an AD topology problem some DCs were not cleaned up. This option is usually recommended if
you want it to do a thorough job.
References
Troubleshooting Active Directory Replication Problems - TechNet landing page for
AD replication troubleshooting articles
http://technet.microsoft.com/en-us/library/cc949120(v=ws.10).aspx
Repadmin
Troubleshooting replication with repadmin
http://www.microsoft.com/en-us/download/details.aspx?id=9028
Page | 67
Troubleshooting Active Directory Replication Errors
-2146893022
Troubleshooting AD Replication error -2146893022: The target principal name is
incorrect.
http://support.microsoft.com/kb/2090913
Kerberos for the busy admin
http://blogs.technet.com/b/askds/archive/2008/03/06/kerberos-for-the-busy-
admin.aspx
1908
Troubleshooting AD Replication error 1908: Could not find the domain controller
for this domain.
http://support.microsoft.com/kb/2712026
Repldiag
Repldiag download
http://activedirectoryutils.codeplex.com/
How to clean one partition at a time
http://blogs.technet.com/b/robertbo/archive/2011/01/20/can-i-clean-one-
partition-at-a-time-with-repldiag-and-other-tips-part-4-of-4.aspx
Page | 68
Troubleshooting Active Directory Replication Errors
8453
Troubleshooting AD Replication error 8453: "Replication access was denied."
http://support.microsoft.com/kb/2022387
8614
Troubleshooting AD Replication error 8614: "The Active Directory cannot
replicate with this server because the time since the last replication with this
server has exceeded the tombstone lifetime"
http://support.microsoft.com/kb/2020053
Fixing When Your Domain Traveled Back In Time, the Great System Time
Rollback to the Year 2000
http://blogs.technet.com/b/askpfeplat/archive/2012/11/26/fixing-when-your-
domain-traveled-back-in-time-the-great-system-time-rollback-to-the-year-
2000.aspx
PowerShell
http://blogs.technet.com/b/ashleymcglone/
AD PowerShell demo
http://blogs.technet.com/b/ashleymcglone/archive/2013/10/26/powershell-
saturday-005-atlanta-it-s-time-to-part-with-blankie-moving-from-command-line-
tools-to-powershell-for-active-directory.aspx
Page | 69
Troubleshooting Active Directory Replication Errors
2. Create a new virtualized guest and specify the VHD created in the previous step.
3. Configure the new VM guest with any applications or utilities you want on all DCs.
4. Sysprep the image and shut down
5. Delete this VM guest from Hyper-V
6. Create new differencing disks from this parent disk (one per DC required)
7. Create new VM guests each one attached to their own differencing disk
8. Configure each with a hostname and IP address information that matches this table:
Table 5 lab configuration
Page | 70
Troubleshooting Active Directory Replication Errors
9. Install the AD DS role on each machine and then configure them per Table 5.
Result: RODC is unable to replicate the TreeRoot partition from any DC with error 8453
Lingering Object (8606), Tombstone lifetime (8614) and Target Principal Name is incorrect repro (-
2146893022)
1. On the Hyper-v host: change system time to a time beyond TSL (in the past) ->result all Hyper-v
guests configured for host time synchronization change their clock as well (this is the default
configuration for hyper-v) s
If time doesn't change immediately: stop and start the vmictimesync service to force a sync
2. Disable host time synchronization on all VMs
Disable-VMIntegrationService -Name "Time Synchronization" -vmname adrepl*
3. Fix Hyper-v Host time (all guests are still using old time)
4. Create user objects on DC1 at this time in the past
5. Move users to Engineering OU
6. Force replication out-> this replicates all new users to DCs in the forest
7. Pause all VMs other than DC1
8. On DC1, Delete one or more user objects
Page | 71
Troubleshooting Active Directory Replication Errors
Page | 72