{"record":{"id":"66a0e255646d53ef","repo":"cilium/cilium","slug":"no-address-found","errorCode":null,"errorMessage":"No address found","messagePattern":"No address found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/node/address_linux.go","lineNumber":116,"sourceCode":"\t}\n\n\t// First, if a device is specified, fall back to anything wider\n\t// than link (site, custom, ...) before trying all devices.\n\tif linkScopeMax != unix.RT_SCOPE_SITE {\n\t\tlinkScopeMax = unix.RT_SCOPE_SITE\n\t\tgoto retryScope\n\t}\n\n\t// Fall back with retry for all interfaces with full scope again\n\t// (which then goes back to lower scope again for all interfaces\n\t// before we give up completely).\n\tif link != nil {\n\t\tlinkScopeMax = unix.RT_SCOPE_UNIVERSE\n\t\tlink = nil\n\t\tgoto retryInterface\n\t}\n\n\treturn nil, fmt.Errorf(\"No address found\")\n}\n\nfunc addrUsableAsNodeIP(a netlink.Addr, isPreferredIP bool, ipsToExclude []net.IP, linkScopeMax, ipLen int) bool {\n\tif a.Scope > linkScopeMax {\n\t\treturn false\n\t}\n\tif ip.ListContainsIP(ipsToExclude, a.IP) {\n\t\treturn false\n\t}\n\tif len(a.IP) < ipLen {\n\t\treturn false\n\t}\n\tif a.Flags&unix.IFA_F_SECONDARY > 0 && !isPreferredIP {\n\t\treturn false\n\t}\n\tif a.Flags&(unix.IFA_F_TENTATIVE|unix.IFA_F_DADFAILED) != 0 {\n\t\treturn false\n\t}","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/pkg/node/address_linux.go#L98-L134","documentation":"firstGlobalAddr enumerates the node's network interfaces and addresses to find a usable global-scope IP (v4 or v6). This error is returned when, after scanning all interfaces and retrying across scopes, no address satisfies addrUsableAsNodeIP. It is the sentinel meaning \"this node has no suitable IP for node addressing\".","triggerScenarios":"FirstGlobalV4Addr or FirstGlobalV6Addr called on a node whose interfaces have only link-local (scope link/host), loopback, excluded, or otherwise non-usable addresses for the requested family.","commonSituations":"Node with only a loopback interface; interfaces down or addresses in tentative/dadfailed state; all candidate IPs excluded by ipsToExclude; IPv6 requested on an IPv4-only node (or vice versa); running in a container/netns without global-scope addresses.","solutions":["Check `ip -4 addr` / `ip -6 addr` on the node for a global-scope address on an up interface.","Bring up the intended interface and ensure it has a properly configured address (no dadfailed/tentative for v6).","Set an explicit node IP via configuration (e.g. cilium-agent --ipv4-node / node-ip config) instead of auto-detection.","Verify ipsToExclude isn't filtering out the only valid address; check k8s node annotations used for exclusions.","Run inside a network namespace that has global addresses (not a bare loopback-only netns)."],"exampleFix":"// before\nip, err := FirstGlobalV6Addr() // IPv6-only request on IPv4-only host -> \"No address found\"\n// after\n// configure a global IPv6 address, or fall back:\nip, err := FirstGlobalV6Addr()\nif err != nil {\n    ip, err = FirstGlobalV4Addr()\n}","handlingStrategy":"fallback","validationCode":"out, _ := exec.Command(\"ip\", \"-o\", \"-4\", \"addr\", \"show\", \"scope\", \"global\").Output()\nif len(out) == 0 {\n    return errors.New(\"node has no global-scope address; set node IP explicitly\")\n}","typeGuard":null,"tryCatchPattern":"ip, err := FirstGlobalV4Addr()\nif err != nil {\n    if err.Error() == \"No address found\" {\n        ip = configuredNodeIP // fallback from config or k8s node object\n    } else {\n        return err\n    }\n}","preventionTips":["Always configure an explicit node IP in containerized/loopback-only environments.","Verify `ip addr scope global` output during node provisioning.","Keep requested interfaces up with valid addresses (watch for IPv6 dadfailed).","Audit exclusion lists so they don't filter out the only usable IP."],"tags":["network","node-ip","addressing","linux"],"backgroundTag":"no-global-address-found","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}