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.
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)
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 URL length must be less than 255 bytes.
- Cluster node cannot have more than 10 IP addresses.
- Failed to initialize Cluster: failed to create the Cluster z
- Failed to delete Cluster: the Cluster is not initialized.
- Failed to add Secondary node: the Cluster is not initialized
AI-assisted analysis of TechnitiumSoftware/DnsServer@d0484b6c1e (2026-08-13).
Data as JSON: /api/errors/d73d15ca54a0d7b2.
Report an issue: GitHub.