Windows Server  ·  high  ·  Directory & core infrastructure

DNS event 4013 — waiting for Active Directory to signal it has completed initial synchronisation

The DNS server will not start its AD-integrated zones because AD has not finished synchronising, and AD cannot synchronise because it needs DNS. On a single DC this deadlock resolves itself; with more than one it may not.

What you see

After a restart, DNS does not answer for the domain. Event 4013 in the DNS Server log. Clients cannot log in and replication fails.

What is actually wrong

The DC could not reach a replication partner during startup. Common after restoring a DC, after a long outage, or when a DC has been offline past the tombstone lifetime.

Codes and articles

4013Event 4013

Fixes (2)

Break the deadlock on a single-DC domain
Elevated PowerShell15 minutesmedium riskreversible

This is the only DC, so there is no partner to wait for and the wait is pointless.

  1. Confirm it really is the only DC.

    PowerShell
    Get-ADDomainController -Filter * | Select-Object Name, Site, IPv4Address
  2. Tell the DC not to require initial synchronisation before advertising.

    PowerShell
    New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\NTDS\Parameters' -Name 'Repl Perform Initial Synchronizations' -Value 0 -PropertyType DWord -Force

    This is safe on a single DC and dangerous on several: it lets a DC advertise before it has caught up, which on a multi-DC domain can hand out stale data. Set it back to 1 if another DC is ever added.

  3. Restart the DC.

  4. Confirm DNS is answering for the zone.

    PowerShell
    Resolve-DnsName example.local -Server 127.0.0.1
Confirm it workeddcdiag passes and clients can authenticate.
PowerShell
dcdiag /v /test:dns
If you need to undo itSet the value back to 1 and restart. Do this before adding a second DC.
Restore replication with the partner
Elevated PowerShell30–60 minuteshigh risknot reversible

There is more than one DC. Do NOT apply the single-DC registry change here — find out why the partner is unreachable instead.

  1. Check how long this DC has been out of touch. If it exceeds the tombstone lifetime, it must be demoted and rebuilt rather than reconnected.

    PowerShell
    repadmin /showreplGet-ADObject -Identity ((Get-ADDomain).DistinguishedName) -Properties tombstoneLifetime

    Reintroducing a DC that has been offline longer than the tombstone lifetime resurrects deleted objects across the forest. That is far worse than the outage you are fixing.

  2. Confirm the partner is reachable on the network and by name.

    PowerShell
    Test-NetConnection DC02 -Port 389Resolve-DnsName DC02
  3. Point this DC's DNS client at a working partner rather than itself.

    PowerShell
    Set-DnsClientServerAddress -InterfaceAlias 'Ethernet' -ServerAddresses 10.0.0.11,127.0.0.1
  4. Restart the DC, then force replication.

    PowerShell
    repadmin /syncall /AdeP
Confirm it workedrepadmin reports successful replication and event 4013 does not recur on restart.
PowerShell
repadmin /replsummary
If you need to undo itIf the DC is past tombstone lifetime, forcibly demote it and clean up its metadata, then promote it fresh.

Where this stops. This write-up was written and checked by hand. It says what each step changes, how to confirm it worked and how to reverse it, and anything destructive is flagged before you reach it. If it does not match what your machine is doing, search the Support Centre for the exact code or message — and when something needs a person, get in touch.