AD Replication Error 8240: There Is No Such Object on the Server

Fix AD error 8240 (there is no such object on the server): event 1126 when no global catalog is reachable, or replication of an object the destination DC lacks (lingering object or a DC demoted too early).

Home › Guides › AD replication error 8240

Last updated 19 November 2026

Quick answer

Win32 error 8240 (0x2030, ERROR_DS_NO_SUCH_OBJECT) means Active Directory looked for an object and couldn't find it. You meet it in two quite different situations, so first work out which one you have:

  1. NTDS General event 1126 with error value 8240: the DC couldn't connect to a global catalog. Check that the forest has a GC (Get-ADDomainController -Discover -Service "GlobalCatalog"), that it's registered in DNS (nltest /dnsgetdc:<DomainName> /gc /force), that isGlobalCatalogReady is TRUE and that port 3268 answers.
  2. Replication fails with 8240 (repadmin, Replicate now, or a DC demotion): the destination DC was asked to apply a change to an object it doesn't have. The usual reason is a lingering object on the source DC, or a source DC that was demoted before every partner pulled its changes. Remove the object (Lingering Object Liquidator or repadmin /removelingeringobjects), deliberately keep it, or rebuild the source DC.

What the error looks like

Situation 1, the Directory Service log on a DC that is looking for a GC:

Event Type: Error
Event Source: NTDS General
Event Category: Global Catalog
Event ID: 1126
User: NT AUTHORITY\ANONYMOUS LOGON
Description:
Active Directory was unable to establish a connection with the global catalog.
Additional Data
Error value:
8240 There is no such object on the server.
Internal ID:
3200ba0

Situation 2, error 8240 during an AD DS operation. repadmin /showreps:

<SiteName>\<DCName>
 objectGuid: <GUID>
  Last attempt @ <Time> failed, result 8240:
 There is no such object on the server.
Last success @ (never).

Replicate now in Active Directory Sites and Services (dssite.msc):

The following error occurred during the attempt to synchronize naming context <Naming-Context> from Domain Controller <Source-DCName> to Domain Controller <Destination-DCName>:
There is no such object on the server. This operation will not continue.

Removing AD DS from a DC (the installation wizard during demotion):

Active Directory could not transfer the remaining data in directory partition <Naming-Context> to domain controller <DCName>. "There is no such object on the server."
Where you see itSituationGo to
Event 1126 (NTDS General, Global Catalog category)1: no usable global catalogSteps 1-3
repadmin /showreps or /showrepl, result 82402: object missing on the destination DCSteps 4-5
Replicate now dialog in dssite.msc2Steps 4-5
Demotion wizard can't transfer remaining data2Steps 4-5

Situation 1: why event 1126 happens

Some work, such as looking up a user's universal group memberships, can only be done by a DC that holds the global catalog role. When a DC needs a GC and can't find an available one, it logs event 1126 with error 8240. Either the forest has no GC at all, or there is one but this DC can't locate it or talk to it.

Step 1: Check that the forest has a global catalog

From PowerShell with the Active Directory module, on any computer in the forest:

Get-ADDomainController -Discover -Service "GlobalCatalog"

Step 2: Add a global catalog

You can promote a new DC as a GC, or turn on the role on an existing DC:

  1. Open Active Directory Sites and Services (dssite.msc, also on the Server Manager Tools menu).
  2. Expand Sites, the DC's site and the DC itself.
  3. Right-click NTDS Settings and choose Properties.
  4. On the General tab tick Global Catalog and click OK.

Don't expect the GC to be usable straight away. The KCC has to work out a new topology, the DC has to pull the read-only partitions for every other domain, and only then does it announce that it's ready. How long that takes depends on your replication schedules, how much data there is and the KCC interval.

Step 3: Check GC registration, readiness and port 3268

  1. Ask DNS for a GC from a computer in the domain:
    nltest /dnsgetdc:<DomainName> /gc /force
  2. If no GC record comes back, check whether the GC thinks it's ready:
    Get-ADRootDSE -Server <GC_Name> | Format-List serverName, isGlobalCatalogReady
    You can read the same attribute by connecting ldp.exe to the GC on port 389. It should be TRUE. FALSE means the GC hasn't finished its first replication yet, or something else is wrong on that server (check its own replication with repadmin /showrepl).
  3. Connect ldp.exe to the GC on port 3268, the global catalog LDAP port. If that connection fails while 389 works, look at firewalls between the two DCs and at the GC itself.

Situation 2: why replication fails with 8240

Every change starts on one DC and spreads from partner to partner. For one source and destination pair the flow that ends in 8240 is:

  1. The source DC tells its partners there's a change.
  2. Each destination DC pulls the change.
  3. The destination looks up its own copy of the object to apply the change to.
  4. It has no copy, so the update fails with 8240.

Microsoft gives two ways an object ends up existing on the source but missing on the destination:

Step 4: Identify the DCs and the object

The DC that reports 8240 is the destination: it doesn't have the object. The source does. Sometimes the error text names the source DC and sometimes it doesn't; in a larger topology, use the destination's Directory Service log and its connection objects in Active Directory Sites and Services to work out which partner sent the change. Check the source's other partners too, because they can report the same 8240. Then pick one of the three options below: remove the object, keep it, or rebuild the source DC.

Step 5: Choose a fix

OptionWhat it doesWhen it fits
1. Remove the inconsistent objects from the source DCTreat them as lingering objects and delete themThe objects should be gone (the usual case)
2. Keep them and replicate them to the forestRegistry changes on the destination DC let it accept and re-create the objectsThe objects are still needed
3. Remove and re-create the source DCForce-demote it, clean up metadata, promote it againThe source DC's data can't be trusted

Option 1: remove lingering objects

Microsoft recommends Lingering Object Liquidator v2 (LoLv2). Where you can't use it, use repadmin, starting in advisory mode so it only reports what it would delete:

repadmin /removelingeringobjects <DC with lingering objects> <writable source DSA GUID> <NC DN> /ADVISORY_MODE

The 8606 guide walks through the whole lingering-object cleanup.

Option 2: keep the objects

Back up the registry first. On the destination DC, under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters, set three REG_DWORD values:

Value nameData
Strict Replication Consistency0
Allow Replication With Divergent and Corrupt Partner1
Correct Missing Object1

Then wait for the next replication cycle, or use Replicate now on the specific connection in Active Directory Sites and Services. Be careful in large forests: while the objects spread, more DCs can report 8240 until replication catches up. Strict replication consistency is the setting that normally stops a DC from accepting lingering objects (see the 8606 guide), so plan to set it back to 1 once the objects you want to keep have replicated.

Option 3: rebuild the source DC

  1. On the source DC, from an elevated PowerShell window, force the demotion:
    Uninstall-ADDSDomainController -ForceRemoval
    Microsoft's article shows -Force; per the cmdlet reference that switch only skips the confirmation prompt, while -ForceRemoval is the one that forces removal (the wizard equivalent is Force the removal of this domain controller in Server Manager's Remove Roles and Features).
  2. Clean up the demoted DC's metadata in the forest.
  3. Promote the server again, ideally with the same method and options you used for the original DC.
  4. Watch the Directory Service log until the promotion and the initial replication of forest data are complete.

Data to check before you change anything

Related tools and guides

Look up 1126, 1388 and 1988 in the Windows Event ID Lookup, copy the Get-ADDomainController, nltest, Get-ADRootDSE, repadmin and Uninstall-ADDSDomainController lines from the PowerShell Cheat Sheet, pull the failing partner and partition out of saved repadmin output with the Regex Tester, check which site a GC address belongs to with the IPv4 Subnet Calculator or IPv6 Subnet Calculator, and identify a device in the path from its MAC address with the MAC Vendor Lookup. Related guides: replication error 8606 (lingering objects), replication error 8614, replication error 8589 and replication error 1908.

Every AD replication error code with its cause and fix: common Active Directory replication errors.

FAQ

What does AD error 8240 mean?

There is no such object on the server (0x2030, ERROR_DS_NO_SUCH_OBJECT): Active Directory looked for an object it needed and couldn't find it. It appears either in event 1126 when a DC can't connect to a global catalog, or in replication when the destination DC doesn't have the object a change refers to.

How do I fix event 1126 with error 8240?

Make sure the forest has a global catalog (Get-ADDomainController -Discover -Service GlobalCatalog), add one in Active Directory Sites and Services if not, then check it's in DNS with nltest /dnsgetdc: /gc /force, that isGlobalCatalogReady is TRUE and that port 3268 answers.

Why does replication fail with 8240?

The destination DC was asked to update an object it doesn't have. Usually the object is a lingering object on the source DC (deleted elsewhere but kept on a DC that missed the deletion past the tombstone lifetime), or the source DC was demoted before all partners pulled its changes.

Should I remove the objects or keep them?

Normally remove them as lingering objects with Lingering Object Liquidator or repadmin /removelingeringobjects. Keep them only if they are really needed: then the destination DC needs Strict Replication Consistency 0, Allow Replication With Divergent and Corrupt Partner 1 and Correct Missing Object 1; plan to set strict replication consistency back to 1 afterwards.

Can I just rebuild the source DC?

Yes, that's the third option: force-demote it with Uninstall-ADDSDomainController -ForceRemoval (or Force the removal in Server Manager), clean up its metadata, promote it again and let it pull a fresh copy of the forest data.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.