TechnitiumSoftware/DnsServer · error · DnsServerException
Failed to update self node URL: the node's domain name alrea
Error message
Failed to update self node URL: the node's domain name already exists in the Cluster. Please try again after changing the DNS Server's domain name.
What it means
Thrown by ClusterManager.UpdateSelfNodeUrlAndCertificate() when the self node's domain name (DnsServer.ServerDomain) collides with the host (Name) of another node already in the cluster. The method regenerates the self node URL/certificate after a domain change and forbids duplicate hostnames so the cluster DNS zone records (NS/A) do not clash. It is a DnsServerException, so it surfaces as a user-facing web API error rather than a raw exception.
Source
Thrown at DnsServerCore/Cluster/ClusterManager.cs:2150
TriggerClusterUpdateForSecondaryNodeChanges();
break;
}
return selfNode;
}
public void UpdateSelfNodeUrlAndCertificate()
{
ClusterNode selfNode = GetSelfNode();
//validation
foreach (KeyValuePair<int, ClusterNode> clusterNode in _clusterNodes)
{
if (clusterNode.Key == selfNode.Id)
continue; //skip self
if (clusterNode.Value.Name.Equals(_dnsWebService.DnsServer.ServerDomain, StringComparison.OrdinalIgnoreCase))
throw new DnsServerException("Failed to update self node URL: the node's domain name already exists in the Cluster. Please try again after changing the DNS Server's domain name.");
}
switch (selfNode.Type)
{
case ClusterNodeType.Primary:
//find existing record TTL values
FindExistingRecordTtlValues(out uint nsTtl, out uint aTtl);
//update cluster zone to remove current self node records
RemoveClusterPrimaryZoneRecordsFor(selfNode);
//update self node
selfNode.UpdateSelfNodeUrl();
//update cluster zone to add updated self node records
AddClusterPrimaryZoneRecordsFor(selfNode, nsTtl, aTtl, _dnsWebService.WebServiceTlsCertificate);
//save all changesView on GitHub (pinned to d0484b6c1e)
Solutions
- Pick a unique DNS Server domain name that does not match any other cluster node's host, then retry.
- If the colliding node is decommissioned/stale, remove it from the cluster first (delete secondary node), then retry the URL update.
- Rename the OTHER node's domain instead of the self node so the self node keeps its identity.
- List all cluster node Names beforehand to confirm the intended value is free.
Example fix
// before: ServerDomain = 'dns1.example.com' while another node already uses dns1.example.com _dnsWebService.DnsServer.ServerDomain = "dns1.example.com"; // collides _clusterManager.UpdateSelfNodeUrlAndCertificate(); // throws [200] // after: choose a distinct hostname per node _dnsWebService.DnsServer.ServerDomain = "dns2.example.com"; // unique in cluster _clusterManager.UpdateSelfNodeUrlAndCertificate(); // ok
Defensive patterns
Strategy: try-catch
Validate before calling
// Before UpdateSelfNodeUrlAndCertificate(): ensure no other node uses the intended domain
string newDomain = _dnsWebService.DnsServer.ServerDomain;
var self = _clusterManager.GetSelfNode();
bool collision = _clusterNodes.Any(kv => kv.Key != self.Id
&& kv.Value.Name.Equals(newDomain, StringComparison.OrdinalIgnoreCase));
if (collision)
throw new InvalidOperationException("Domain '" + newDomain + "' is already used by another cluster node."); Try / catch
try
{
_clusterManager.UpdateSelfNodeUrlAndCertificate();
}
catch (DnsServerException ex) when (ex.Message.Contains("domain name already exists in the Cluster"))
{
// surface to user: prompt for a unique domain name
logger.LogWarning("Self node URL update rejected: duplicate domain. {Message}", ex.Message);
return Problem(ex.Message);
} Prevention
- Maintain a unique hostname per cluster node; never reuse a peer's domain.
- Before renaming a node, check every other node's Name property.
- When restoring config backups, verify the ServerDomain does not collide with live peers.
When it happens
Trigger: Changing the DNS Server domain name to a value that equals another cluster node's hostname, then triggering UpdateSelfNodeUrlAndCertificate (e.g. via the settings API / TLS cert refresh). The loop at ClusterManager.cs:2144 skips only the self node's own Id and compares every other node's Name against ServerDomain.
Common situations: Renaming two clustered DNS servers to the same domain; restoring a config backup whose ServerDomain matches a peer; a secondary node joining with the primary's domain name; split-brain where both nodes were configured with an identical FQDN.
Related errors
- Failed to update Cluster options: the Cluster is not initial
- Failed to update Cluster options: only the Primary node can
- Failed to update Cluster options: The config refresh interva
- Failed to delete Secondary node: the specified node is the C
- Failed to delete Secondary node: please try again.
AI-assisted analysis of TechnitiumSoftware/DnsServer@d0484b6c1e (2026-08-13).
Data as JSON: /api/errors/ba245be49e3210fd.
Report an issue: GitHub.