{"record":{"id":"322d11285f6f1ae2","repo":"hashicorp/nomad","slug":"failed-to-configure-network-no-interfaces-found","errorCode":null,"errorMessage":"failed to configure network: no interfaces found","messagePattern":"failed to configure network: no interfaces found","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/allocrunner/networking_cni.go","lineNumber":441,"sourceCode":"\t\treturn \"\", 0\n\t}\n\tdnsPort, ok := c.nodeAttrs[dnsPortAttr]\n\tif !ok || dnsPort == \"0\" || dnsPort == \"-1\" {\n\t\treturn \"\", 0\n\t}\n\tport, err := strconv.ParseUint(dnsPort, 10, 16)\n\tif err != nil {\n\t\treturn \"\", 0 // note: this will have been checked in fingerprint\n\t}\n\treturn dnsAddr, int(port)\n}\n\n// cniToAllocNet converts a cni.Result to an AllocNetworkStatus or returns an\n// error. The first interface and IP with a sandbox and address set are\n// preferred. Failing that the first interface with an IP is selected.\nfunc (c *cniNetworkConfigurator) cniToAllocNet(res *cni.Result) (*structs.AllocNetworkStatus, error) {\n\tif len(res.Interfaces) == 0 {\n\t\treturn nil, fmt.Errorf(\"failed to configure network: no interfaces found\")\n\t}\n\n\tnetStatus := new(structs.AllocNetworkStatus)\n\n\t// Unfortunately the go-cni library returns interfaces in an unordered map meaning\n\t// the results may be nondeterministic depending on CNI plugin output so make\n\t// sure we sort them by interface name.\n\tnames := make([]string, 0, len(res.Interfaces))\n\tfor k := range res.Interfaces {\n\t\tnames = append(names, k)\n\t}\n\tsort.Strings(names)\n\n\t// setStatus sets netStatus.Address and netStatus.InterfaceName\n\t// if it finds a suitable interface that has IP address(es)\n\t// (at least IPv4, possibly also IPv6)\n\tsetStatus := func(requireSandbox bool) {\n\t\tfor _, name := range names {","sourceCodeStart":423,"sourceCodeEnd":459,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/allocrunner/networking_cni.go#L423-L459","documentation":"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.","triggerScenarios":"Thrown at client/allocrunner/networking_cni.go:441 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the CNI result in debug logs to see what the plugins returned","Update/verify bridge CNI plugin version compatibility","Check that the bridge plugin is configured to report interfaces","Retry the allocation after fixing the CNI configuration"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}