TechnitiumSoftware/DnsServer · error · ArgumentException
Cluster node URL must use HTTPS scheme.
Error message
Cluster node URL must use HTTPS scheme.
What it means
Constructor argument guard on the explicit ClusterNode overload. It requires the URL scheme to be 'https' (case-insensitive). Inter-node cluster API calls are made over TLS via HttpApiClient, and the cluster is designed to never communicate in plaintext, so http:// URLs are rejected at construction.
Solutions
- Use an https:// URL for the cluster node (enable TLS on the web service / supply a valid certificate).
- If testing locally without TLS, use a self-signed certificate so the scheme can still be https.
- Correct the config/UI entry that stored the http:// URL.
- Validate url.Scheme equals 'https' before constructing the node.
Example fix
// before
var url = new Uri("http://ns1.example.com:5380/"); // plain HTTP
var node = new ClusterNode(mgr, id, url, ips, type, state); // throws [202]
// after: enable TLS and use https
var url = new Uri("https://ns1.example.com:53443/");
var node = new ClusterNode(mgr, id, url, ips, type, state); Defensive patterns
Strategy: validation
Validate before calling
static void ValidateClusterNodeUrl(Uri url)
{
ArgumentNullException.ThrowIfNull(url);
if (!url.Scheme.Equals("https", StringComparison.OrdinalIgnoreCase))
throw new ArgumentException("Cluster node URL must use HTTPS.", nameof(url));
}
ValidateClusterNodeUrl(url);
var node = new ClusterNode(mgr, id, url, ips, type, state); Type guard
static bool IsClusterNodeUrlSecure(Uri url) =>
url is not null && url.Scheme.Equals("https", StringComparison.OrdinalIgnoreCase); Prevention
- Always use https:// for cluster node URLs.
- Enable TLS on every node before joining the cluster.
- Audit stored cluster config for any http:// URLs.
When it happens
Trigger: Instantiating ClusterNode with a Uri whose Scheme is 'http' (or anything other than https), e.g. http://host:5380/.
Common situations: Local testing with http:// to avoid certificate setup; misconfigured reverse proxy/base URL that strips TLS; a node URL typed with the wrong scheme in config; importing a config file that stored an http URL.
Related errors
- Cluster node cannot have more than 10 IP addresses.
- Cluster node URL length must be less than 255 bytes.
- Address family not supported.
- Boot file name cannot exceed 127 bytes.
- Client hardware address cannot exceed 16 bytes.
AI-assisted analysis of TechnitiumSoftware/DnsServer@d0484b6c1e (2026-08-13).
Data as JSON: /api/errors/d73d15ca54a0d7b2.
Report an issue: GitHub.
Appendix: source
Thrown at DnsServerCore/Cluster/ClusterNode.cs:101
if (_type == ClusterNodeType.Primary)
{
_lastSeen = DateTime.UtcNow;
_state = ClusterNodeState.Connected; //since this info was received from primary node
}
else
{
_state = ClusterNodeState.Unknown;
}
}
public ClusterNode(ClusterManager clusterManager, int id, Uri url, IReadOnlyList<IPAddress> ipAddresses, ClusterNodeType type, ClusterNodeState state)
{
if (url.OriginalString.Length > 255)
throw new ArgumentException("Cluster node URL length must be less than 255 bytes.", nameof(url));
if (!url.Scheme.Equals("https", StringComparison.OrdinalIgnoreCase))
throw new ArgumentException("Cluster node URL must use HTTPS scheme.", nameof(url));
if (ipAddresses.Count > 10)
throw new ArgumentException("Cluster node cannot have more than 10 IP addresses.", nameof(ipAddresses));
_clusterManager = clusterManager;
_id = id;
_url = url;
_ipAddresses = ipAddresses;
_type = type;
_state = state;
}
public ClusterNode(ClusterManager clusterManager, BinaryReader bR)
{
_clusterManager = clusterManager;
int version = bR.ReadByte();View on GitHub (pinned to d0484b6c1e)