juanfont/headscale · error

building IPSet for %q: %w

Error message

building IPSet for %q: %w

What it means

Error "building IPSet for %q: %w" thrown in juanfont/headscale.

Source

Thrown at hscontrol/policy/v2/sshtest.go:481

			}

			continue
		}

		ips, err := alias.Resolve(pol, users, nodes)
		if err != nil {
			return nil, nil, fmt.Errorf("resolving destination %q: %w", dstLabel, err)
		}

		if ips == nil || ips.Empty() {
			emptyDsts = append(emptyDsts, dstLabel)

			continue
		}

		set, err := prefixesToIPSet(ips.Prefixes())
		if err != nil {
			return nil, nil, fmt.Errorf("building IPSet for %q: %w", dstLabel, err)
		}

		for _, n := range nodes.All() {
			if !n.InIPSet(set) {
				continue
			}

			matched = true

			if _, dup := seen[n.ID()]; dup {
				continue
			}

			seen[n.ID()] = struct{}{}
			out = append(out, n)
		}

		if !matched {

View on GitHub (pinned to 565fd254d0)

Solutions

  1. Inspect the wrapped error for the underlying cause and correct the failing condition (building IPSet for); retry the operation after fixing the input, configuration, or environment.

Example fix

Inspect the wrapped error for the underlying cause and correct the failing condition (building IPSet for); retry the operation after fixing the input, configuration, or environment.

When it happens

Trigger: Thrown at hscontrol/policy/v2/sshtest.go:481 when the library encounters an invalid state.

Common situations: Building the IP set for a policy alias failed. Verify the alias resolves to valid hosts, users, tags, or prefixes.


AI-assisted analysis of juanfont/headscale@565fd254d0 (2026-08-15). Data as JSON: /api/errors/b3035c33b85c01f2. Report an issue: GitHub.