ruvnet/ruflo · error · Error
deriveMeshIP: subnet
Error message
deriveMeshIP: subnet ${subnet} exhausted after 1024 probes for ${nodeId}; jump to a wider range What it means
deriveMeshIP exhausted its probe budget: for the given nodeId it tried the sha256-derived host address plus 1024 salted probes (nodeId + \x00n) and every candidate IP was already in usedIPs. This means the subnet is functionally full and the operator must widen the mesh range before this node can join.
Solutions
- Move the mesh to a wider subnet as the message suggests.
- Reclaim addresses from decommissioned nodes before adding new ones.
Defensive patterns
Strategy: validation
When it happens
Trigger: deriveMeshIP fails to find a free address in the subnet after 1024 deterministic probes for a node id.
Common situations: Subnet nearly exhausted by existing nodes, or probe collisions in a too-narrow range.
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/5f4befc8909bc1d7.
Report an issue: GitHub.
Appendix: source
Thrown at v3/@claude-flow/plugin-agent-federation/src/domain/value-objects/wg-config.ts:138
const hostBits = 32 - prefix;
const hostMask = hostBits >= 32 ? 0xffffffff : ((1 << hostBits) - 1) >>> 0;
const networkBase = (base & ~hostMask) >>> 0;
for (let probe = 0; probe < 1024; probe++) {
const input = probe === 0 ? nodeId : `${nodeId}\x00${probe}`;
const hash = createHash('sha256').update(input).digest();
// Use the first 4 bytes as the host portion.
const hashHost = ((hash[0] << 24) | (hash[1] << 16) | (hash[2] << 8) | hash[3]) >>> 0;
let candidate = (networkBase | (hashHost & hostMask)) >>> 0;
const lastOctet = candidate & 0xff;
// Avoid .0 (network) and .255 (broadcast) of each /24 slice. Cheap
// clamp: bump to .1 if landing on .0, or .254 if landing on .255.
if (lastOctet === 0) candidate = (candidate | 1) >>> 0;
else if (lastOctet === 255) candidate = (candidate & ~1) >>> 0;
const ip = `${ipToString(candidate)}/32`;
if (!usedIPs.has(ip)) return ip;
}
throw new Error(`deriveMeshIP: subnet ${subnet} exhausted after 1024 probes for ${nodeId}; jump to a wider range`);
}
View on GitHub (pinned to fa13ee4ad6)