Skip to content

Commit 5dae8a6

Browse files
committed
AB#7577: ADDS Endless loop when you use the Adamsync tool in Windows
Recreated/updated article for [CI 7577](https://dev.azure.com/KMOps/ContentExperience/_queries/edit/7577)
1 parent 82b382f commit 5dae8a6

1 file changed

Lines changed: 129 additions & 0 deletions

File tree

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
---
2+
title: Synchronizing Between AD DS and AD LDS Enters Endless Loop when the BaseDN is a Grandchild OU
3+
description: Discusses how to work around a behavior in the Adamsync tool in which the synchronization process enters an endless loop that you can only stop by using Task Manager or by pressing CTRL + C.
4+
ms.date: 01/09/2026
5+
manager: dcscontentpm
6+
audience: itpro
7+
ms.topic: troubleshooting
8+
ms.reviewer: kaushika, herbertm, v-appelgatet
9+
ms.custom:
10+
- sap:active directory\active directory lightweight directory services (ad lds)
11+
- pcy:WinComm Directory Services
12+
appliesto:
13+
- ✅ <a href=https://learn.microsoft.com/windows/release-health/windows-server-release-info target=_blank>Supported versions of Windows Server</a>
14+
- ✅ <a href=https://learn.microsoft.com/windows/release-health/supported-versions-windows-client target=_blank>Supported versions of Windows Client</a>
15+
---
16+
17+
# Synchronizing between AD DS and AD LDS enters endless loop when the baseDN is a grandchild OU
18+
19+
This article discusses how to work around a behavior in the Adamsync tool in which the synchronization process enters an endless loop that you can only stop by using Task Manager or by pressing CTRL + C.
20+
21+
_Original KB number:_ &nbsp; 926933
22+
23+
## Symptoms
24+
25+
You have an Active Directory Directory Service (AD DS) forest and an Active Directory Lightweight Directory Service (AD LDS) instance. You use the Active Directory Application Mode (ADAM) Synchronizer (Adamsync) tool in Microsoft Windows to synchronize data from the AD DS forest to the AD LDS instance. However, the synchronization never finishes. For a detailed walkthrough of this process, see [More information](#more-information).
26+
27+
This issue occurs if you have specified a grandchild organizational unit (OU) in the AD DS forest as the base distinguished name (base DN) in Adamsync's XML configuration file. Such a configuration resembles the following example:
28+
29+
```xml
30+
<base-dn>OU=Grandchild,OU=Child,DC=03child,DC=MyDomCon,DC=net</base-dn>
31+
```
32+
33+
By default, the configuration file is named MS-AdamsyncConf.XML and it resides in the %windir%\adam folder.
34+
35+
## Cause
36+
37+
This is a known issue in the Adamsync tool.
38+
39+
## Workaround
40+
41+
To work around this issue, use one of the following methods:
42+
43+
- Before you run the Adamsync tool, create the grandchild OU in the AD LDS instance. Then, in the Adamsync configuration file, specify the grandchild OU as the base DN.
44+
45+
- Instead of specifying the grandchild OU as the base DN in the Adamsync configuration file, specify the child OU as the base DN. For example, use the following syntax to specify the base DN in the Adamsync configuration file:
46+
47+
```xml
48+
<base-dn>OU=Child,DC=DomainComponentName,...</base-dn>
49+
```
50+
51+
## More information
52+
53+
You can reproduce the issue by following these steps:
54+
55+
1. Configure an AD LDS instance (or a configuration set of instances) as described in the [Preparing an AD LDS instance for synchronization](/previous-versions/windows/it-pro/windows-server-2008-r2-and-2008/cc770408(v=ws.10)#preparing-an-adlds-instance-for-synchronization) section of "Synchronize with Active Directory Domain Services."
56+
57+
1. Edit the Adamsync tool's configuration file to synchronize data from an Active Directory forest to the instance or configuration set. Set the base DN to be the grandchild OU.
58+
59+
For example, include parameters that resemble the following example in the My-Custom-AdamsyncConf.XML configuration file:
60+
61+
```xml
62+
<source-ad-name>03child.MyDomCon.net</source-ad-name>
63+
<source-ad-partition>dc=03child,dc=MyDomCon,dc=net</source-ad-partition>
64+
<source-ad-account></source-ad-account>
65+
<account-domain></account-domain>
66+
<target-dn>dc=lds-target,dc=com</target-dn>
67+
<query>
68+
<base-dn>OU=Grandchild,OU=Child,DC=03child,DC=MyDomCon,DC=net</base-dn>
69+
```
70+
71+
1. To install the Adamsync configuration, open a Windows Command Prompt window, and then run the following command:
72+
73+
```console
74+
Adamsync.exe /install <AdamServerName>:<PortNo> My-Custom-AdamsyncConf.XML
75+
```
76+
77+
> [!NOTE]
78+
> In this command (and in the other steps of this procedure) `<AdamServerName>` represents the name of the computer that runs the Adamsync tool, and `<PortNo>` represents the number of the port that the Adamsync tool uses.
79+
80+
1. To start synchronizing, run the following command at the command prompt:
81+
82+
```console
83+
Adamsync /sync <AdamServerName>:<PortNo> "dc=lds-target,dc=com" /Log Synclog.txt
84+
```
85+
86+
[!NOTE]
87+
In this command, `dc=lds-target,dc=com` represents the target naming context in the AD LDS instance. `Synclog.txt` is the file name of the synchronization log.
88+
89+
The synchronization process runs for a much longer time than you expect.
90+
91+
1. After the synchronization process runs for a while, use Task Manager to end the Adamsync process.
92+
93+
1. Open the log file that you specified in step 4. The log file contains entries that resemble the following example:
94+
95+
```output
96+
Processing Entry: Page 1, Frame 2, Entry 0, Count 0, USN 3707635
97+
Processing source entry <guid=f356ef7ee6f25d46835363baa7d6de2c>
98+
Processing in-scope entry f356ef7ee6f25d46835363baa7d6de2c.
99+
Adding target object OU=Grandchild,OU=Child,dc=lds-target,dc=com.
100+
Adding attributes: objectClass, instanceType, sourceobjectguid, lastagedchange,
101+
Adding target object OU=Grandchild,OU=Child,dc=lds-target,dc=com. Requesting replication of parent.
102+
Previous entry took 0 seconds (16, 0) to process
103+
104+
Processing Entry: Page 1, Frame 3, Entry 0, Count 0, USN 3704672
105+
Processing source entry <guid=8416cee1dc410d47a871c4905a7e3bda>
106+
Previous entry took 0 seconds (0, 0) to process
107+
108+
Processing Entry: Page 1, Frame 2, Entry 0, Count 0, USN 3707635
109+
Processing source entry <guid=f356ef7ee6f25d46835363baa7d6de2c>
110+
Processing in-scope entry f356ef7ee6f25d46835363baa7d6de2c.
111+
Adding target object OU=Grandchild,OU=Child,dc=lds-target,dc=com.
112+
Adding attributes: objectClass, instanceType, sourceobjectguid, lastagedchange,
113+
Adding target object OU=Grandchild,OU=Child,dc=lds-target,dc=com. Requesting replication of parent.
114+
Previous entry took 0 seconds (4, 0) to process
115+
116+
Processing Entry: Page 1, Frame 3, Entry 0, Count 0, USN 3704672
117+
Processing source entry <guid=8416cee1dc410d47a871c4905a7e3bda>
118+
Previous entry took 0 seconds (2, 0) to process
119+
```
120+
121+
This pattern of entries keeps repeating through the log file.
122+
123+
## References
124+
125+
- [Synchronize with Active Directory Domain Services](/previous-versions/windows/it-pro/windows-server-2008-r2-and-2008/cc770408(v=ws.10))
126+
- [Adamsync](/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc753547(v=ws.10))
127+
- [Active Directory Lightweight Directory Services Overview](/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh831593(v=ws.11))
128+
- [Active Directory Lightweight Directory Services](/previous-versions/windows/desktop/adam/active-directory-lightweight-directory-services)
129+
- [Adamsync 101](https://techcommunity.microsoft.com/blog/askds/Adamsync-101/400165)

0 commit comments

Comments
 (0)