TechnitiumSoftware/DnsServer · error · DnsServerException

Failed to update Secondary node: A node with the same DNS Se

Error message

Failed to update Secondary node: A node with the same DNS Server Domain Name already exists in the Cluster. Please try again after changing the Secondary node's DNS Server Domain Name.

What it means

UpdateSecondaryNode rejects the new URL because another cluster member already uses the same DNS Server Domain Name (secondaryNodeUrl.Host). The cluster requires unique domain names so member records (NS/A) do not collide.

Source

Thrown at DnsServerCore/Cluster/ClusterManager.cs:839

            if (GetSelfNode().Type != ClusterNodeType.Primary)
                throw new DnsServerException("Failed to update Secondary node: only a Primary node can update a Secondary node's details in the Cluster.");

            IReadOnlyDictionary<int, ClusterNode> clusterNodes = _clusterNodes;

            if (!clusterNodes.TryGetValue(secondaryNodeId, out ClusterNode secondaryNode))
                throw new DnsServerException("Failed to update Secondary node: the specified node does not exist in the Cluster.");

            if (secondaryNode.Type != ClusterNodeType.Secondary)
                throw new DnsServerException("Failed to update Secondary node: the specified node to update must be a Secondary node.");

            //validate for duplicate names
            foreach (KeyValuePair<int, ClusterNode> clusterNode in clusterNodes)
            {
                if (clusterNode.Key == secondaryNodeId)
                    continue; //skip self

                if (clusterNode.Value.Name.Equals(secondaryNodeUrl.Host, StringComparison.OrdinalIgnoreCase))
                    throw new DnsServerException("Failed to update Secondary node: A node with the same DNS Server Domain Name already exists in the Cluster. Please try again after changing the Secondary node's DNS Server Domain Name.");
            }

            bool secondaryNodeDomainChanged = !secondaryNode.Name.Equals(secondaryNodeUrl.Host, StringComparison.OrdinalIgnoreCase);

            //find existing record TTL values
            FindExistingRecordTtlValues(out uint nsTtl, out uint aTtl);

            //update cluster zone to remove existing records for secondary node
            RemoveClusterPrimaryZoneRecordsFor(secondaryNode);

            //update secondary node URL and IP address
            secondaryNode.UpdateNode(secondaryNodeUrl, secondaryNodeIpAddresses);

            //update cluster zone to add updated records for secondary node and save zone file
            AddClusterPrimaryZoneRecordsFor(secondaryNode, nsTtl, aTtl, secondaryNodeCertificate);

            //update cluster catalog zone ACLs and save zone file
            UpdateClusterCatalogZoneOptions();

View on GitHub (pinned to d0484b6c1e)

Solutions

  1. Choose a unique domain name (host) for the Secondary's URL
  2. Rename or remove the conflicting member first
  3. Check the intended host against the current member list

Example fix

// before
var url = new Uri("https://dns2.example.com:5380/");
clusterManager.UpdateSecondaryNode(id, url, ips, cert);

// after
var url = new Uri("https://dns2-new.example.com:5380/"); // unique host
clusterManager.UpdateSecondaryNode(id, url, ips, cert);
Defensive patterns

Strategy: validation

Validate before calling

string host = secondaryNodeUrl.Host;
bool dup = clusterState.ClusterNodes.Any(n =>
    n.Id != secondaryNodeId &&
    n.Name.Equals(host, StringComparison.OrdinalIgnoreCase));
if (dup) return Conflict("A member already uses this domain name.");
clusterManager.UpdateSecondaryNode(secondaryNodeId, secondaryNodeUrl, ips, cert);

Try / catch

catch (DnsServerException ex) when (ex.Message.Contains("same DNS Server Domain Name"))
{ /* prompt user for a unique domain name */ }

Prevention

When it happens

Trigger: Renaming a Secondary to a host that matches another member's name; pointing two Secondaries at the same domain; a typo reusing an existing host.

Common situations: Reusing a hostname during a migration; cloning a Secondary's config without changing its domain; DNS aliasing two nodes to one name.

Related errors


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