{"record":{"id":"b5ca27c9b120355a","repo":"TechnitiumSoftware/DnsServer","slug":"failed-to-transfer-configuration-the-cluster-is-n","errorCode":null,"errorMessage":"Failed to transfer configuration: the Cluster is not initialized.","messagePattern":"Failed to transfer configuration: the Cluster is not initialized\\.","errorType":"exception","errorClass":"DnsServerException","httpStatus":null,"severity":"error","filePath":"DnsServerCore/Cluster/ClusterManager.cs","lineNumber":875,"sourceCode":"            UpdateClusterCatalogZoneOptions();\n\n            //save all changes\n            SaveConfigFile();\n\n            //notify all secondary nodes\n            TriggerNotifyAllSecondaryNodes();\n\n            //trigger NS and SOA update for member zones only if secondary node domain name has changed\n            if (secondaryNodeDomainChanged)\n                TriggerRecordUpdateForClusterCatalogMemberZones();\n\n            return secondaryNode;\n        }\n\n        public Task TransferConfigAsync(Stream zipStream, DateTime ifModifiedSince, ICollection<string> includeZones)\n        {\n            if (!ClusterInitialized)\n                throw new DnsServerException(\"Failed to transfer configuration: the Cluster is not initialized.\");\n\n            if (GetSelfNode().Type != ClusterNodeType.Primary)\n                throw new DnsServerException(\"Failed to transfer configuration: only the Primary node can transfer the configuration.\");\n\n            return _dnsWebService.BackupConfigAsync(zipStream: zipStream,\n                                                    authConfig: true,\n                                                    clusterConfig: false,\n                                                    webServiceSettings: false,\n                                                    dnsSettings: true,\n                                                    logSettings: false,\n                                                    zones: true,\n                                                    allowedZones: true,\n                                                    blockedZones: true,\n                                                    blockLists: true,\n                                                    apps: true,\n                                                    scopes: false,\n                                                    stats: false,\n                                                    logs: false,","sourceCodeStart":857,"sourceCodeEnd":893,"githubUrl":"https://github.com/TechnitiumSoftware/DnsServer/blob/d0484b6c1e7439cdc53d67d81e9c876cda2ad756/DnsServerCore/Cluster/ClusterManager.cs#L857-L893","documentation":"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.","triggerScenarios":"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.","commonSituations":"Misconfigured Secondary pointing at the wrong endpoint; a cluster init that failed; pointing at a standalone server.","solutions":["Call TransferConfigAsync against the cluster Primary","Verify ClusterInitialized is true on the target first","Re-initialize the cluster if setup did not complete"],"exampleFix":"// before\nawait clusterManager.TransferConfigAsync(stream, since, zones);\n\n// after\nif (!clusterManager.ClusterInitialized)\n    throw new InvalidOperationException(\"No cluster on this node; cannot transfer config.\");\nawait clusterManager.TransferConfigAsync(stream, since, zones);","handlingStrategy":"validation","validationCode":"if (!clusterManager.ClusterInitialized)\n    return BadRequest(\"Target node has no cluster initialized.\");\nreturn await clusterManager.TransferConfigAsync(stream, ifModifiedSince, includeZones);","typeGuard":null,"tryCatchPattern":"catch (DnsServerException ex) when (ex.Message.Contains(\"Cluster is not initialized\"))\n{ /* point Secondary at the actual Primary */ }","preventionTips":["Secondaries should discover and pin the Primary before pulling config","Health-check cluster state on the target before transfer"],"tags":["cluster","lifecycle","config-transfer","validation","dns-server"],"backgroundTag":null,"analyzedSha":"d0484b6c1e7439cdc53d67d81e9c876cda2ad756","analyzedAt":"2026-08-13T22:57:35.508Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}