hashicorp/nomad · error

failed to configure network: no interfaces found

Error message

failed to configure network: no interfaces found

What it means

cniToAllocNet found a CNI result whose interfaces list is empty or lacks any sandbox interface, so it cannot build an AllocNetworkStatus; network setup fails because no interface information came back from the CNI plugins.

Source

Thrown at client/allocrunner/networking_cni.go:441

		return "", 0
	}
	dnsPort, ok := c.nodeAttrs[dnsPortAttr]
	if !ok || dnsPort == "0" || dnsPort == "-1" {
		return "", 0
	}
	port, err := strconv.ParseUint(dnsPort, 10, 16)
	if err != nil {
		return "", 0 // note: this will have been checked in fingerprint
	}
	return dnsAddr, int(port)
}

// cniToAllocNet converts a cni.Result to an AllocNetworkStatus or returns an
// error. The first interface and IP with a sandbox and address set are
// preferred. Failing that the first interface with an IP is selected.
func (c *cniNetworkConfigurator) cniToAllocNet(res *cni.Result) (*structs.AllocNetworkStatus, error) {
	if len(res.Interfaces) == 0 {
		return nil, fmt.Errorf("failed to configure network: no interfaces found")
	}

	netStatus := new(structs.AllocNetworkStatus)

	// Unfortunately the go-cni library returns interfaces in an unordered map meaning
	// the results may be nondeterministic depending on CNI plugin output so make
	// sure we sort them by interface name.
	names := make([]string, 0, len(res.Interfaces))
	for k := range res.Interfaces {
		names = append(names, k)
	}
	sort.Strings(names)

	// setStatus sets netStatus.Address and netStatus.InterfaceName
	// if it finds a suitable interface that has IP address(es)
	// (at least IPv4, possibly also IPv6)
	setStatus := func(requireSandbox bool) {
		for _, name := range names {

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Inspect the CNI result in debug logs to see what the plugins returned
  2. Update/verify bridge CNI plugin version compatibility
  3. Check that the bridge plugin is configured to report interfaces
  4. Retry the allocation after fixing the CNI configuration
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at client/allocrunner/networking_cni.go:441 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04). Data as JSON: /api/errors/322d11285f6f1ae2. Report an issue: GitHub.