TechnitiumSoftware/DnsServer · error · DnsServerException

Failed to transfer configuration: the Cluster is not initial

Error message

Failed to transfer configuration: the Cluster is not initialized.

What it means

TransferConfigAsync refuses to stream configuration because the local node is not part of a cluster (ClusterInitialized is false). Config transfer is a cluster feature that only the Primary serves to its Secondaries.

Source

Thrown at DnsServerCore/Cluster/ClusterManager.cs:875

            UpdateClusterCatalogZoneOptions();

            //save all changes
            SaveConfigFile();

            //notify all secondary nodes
            TriggerNotifyAllSecondaryNodes();

            //trigger NS and SOA update for member zones only if secondary node domain name has changed
            if (secondaryNodeDomainChanged)
                TriggerRecordUpdateForClusterCatalogMemberZones();

            return secondaryNode;
        }

        public Task TransferConfigAsync(Stream zipStream, DateTime ifModifiedSince, ICollection<string> includeZones)
        {
            if (!ClusterInitialized)
                throw new DnsServerException("Failed to transfer configuration: the Cluster is not initialized.");

            if (GetSelfNode().Type != ClusterNodeType.Primary)
                throw new DnsServerException("Failed to transfer configuration: only the Primary node can transfer the configuration.");

            return _dnsWebService.BackupConfigAsync(zipStream: zipStream,
                                                    authConfig: true,
                                                    clusterConfig: false,
                                                    webServiceSettings: false,
                                                    dnsSettings: true,
                                                    logSettings: false,
                                                    zones: true,
                                                    allowedZones: true,
                                                    blockedZones: true,
                                                    blockLists: true,
                                                    apps: true,
                                                    scopes: false,
                                                    stats: false,
                                                    logs: false,

View on GitHub (pinned to d0484b6c1e)

Solutions

  1. Call TransferConfigAsync against the cluster Primary
  2. Verify ClusterInitialized is true on the target first
  3. Re-initialize the cluster if setup did not complete

Example fix

// before
await clusterManager.TransferConfigAsync(stream, since, zones);

// after
if (!clusterManager.ClusterInitialized)
    throw new InvalidOperationException("No cluster on this node; cannot transfer config.");
await clusterManager.TransferConfigAsync(stream, since, zones);
Defensive patterns

Strategy: validation

Validate before calling

if (!clusterManager.ClusterInitialized)
    return BadRequest("Target node has no cluster initialized.");
return await clusterManager.TransferConfigAsync(stream, ifModifiedSince, includeZones);

Try / catch

catch (DnsServerException ex) when (ex.Message.Contains("Cluster is not initialized"))
{ /* point Secondary at the actual Primary */ }

Prevention

When it happens

Trigger: A Secondary requesting config from a node that is not the initialized Primary; calling transfer before cluster setup finished; after leaving or resetting the cluster.

Common situations: Misconfigured Secondary pointing at the wrong endpoint; a cluster init that failed; pointing at a standalone server.

Related errors


AI-assisted analysis of TechnitiumSoftware/DnsServer@d0484b6c1e (2026-08-13). Data as JSON: /api/errors/b5ca27c9b120355a. Report an issue: GitHub.