{"record":{"id":"3ac02a925a6b36b8","repo":"hashicorp/nomad","slug":"error-while-detecting-network-interface-s-during","errorCode":null,"errorMessage":"Error while detecting network interface %s during fingerprinting: %v","messagePattern":"Error while detecting network interface (.+?) during fingerprinting: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/fingerprint/network.go","lineNumber":80,"sourceCode":"func (b *DefaultNetworkInterfaceDetector) Addrs(intf *net.Interface) ([]net.Addr, error) {\n\treturn intf.Addrs()\n}\n\n// NewNetworkFingerprint returns a new NetworkFingerprinter with the given\n// logger\nfunc NewNetworkFingerprint(logger log.Logger) Fingerprint {\n\tf := &NetworkFingerprint{logger: logger.Named(\"network\"), interfaceDetector: &DefaultNetworkInterfaceDetector{}}\n\treturn f\n}\n\nfunc (f *NetworkFingerprint) Fingerprint(req *FingerprintRequest, resp *FingerprintResponse) error {\n\tcfg := req.Config\n\n\t// Find the named interface\n\tintf, err := f.findInterface(cfg.NetworkInterface)\n\tswitch {\n\tcase err != nil:\n\t\treturn fmt.Errorf(\"Error while detecting network interface %s during fingerprinting: %v\",\n\t\t\tcfg.NetworkInterface,\n\t\t\terr)\n\tcase intf == nil:\n\t\t// No interface could be found\n\t\treturn nil\n\t}\n\n\t// Create a sub-logger with common values to help with debugging\n\tlogger := f.logger.With(\"interface\", intf.Name)\n\n\t// Record the throughput of the interface\n\tvar mbits int\n\tthroughput := f.linkSpeed(intf.Name)\n\tif cfg.NetworkSpeed != 0 {\n\t\tmbits = cfg.NetworkSpeed\n\t\tlogger.Debug(\"setting link speed to user configured speed\", \"mbits\", mbits)\n\t} else if throughput != 0 {\n\t\tmbits = throughput","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/fingerprint/network.go#L62-L98","documentation":"The network fingerprinter failed while trying to detect the network interface named in the client config (network_interface). It wraps the underlying detection error from findInterface. The fingerprinter returns this instead of a fingerprint result, so the client logs a fingerprint failure.","triggerScenarios":"Client config sets a network_interface that findInterface cannot resolve, or the default-route lookup fails, causing findInterface to return an error which Fingerprint wraps in this message with the configured interface name.","commonSituations":"Typo or renamed interface in the Nomad client 'network_interface' config; interface removed after a network reconfiguration; container/VM without the expected interface; inability to determine the default route interface.","solutions":["Verify cfg.NetworkInterface matches an interface shown by 'ip link' (or 'ifconfig').","Leave network_interface unset to auto-detect via the default route, or set it explicitly to a valid device.","Check the wrapped error (%v) for the root cause (no such interface, permission, no default route).","Confirm the interface exists at client startup; disable the network fingerprinter if not needed."],"exampleFix":"// before (config)\nnetwork_interface = \"etho\"\n// after\nnetwork_interface = \"eth0\"","handlingStrategy":"validation","validationCode":"intfName := cfg.NetworkInterface\nif intfName != \"\" {\n\tif _, err := net.InterfaceByName(intfName); err != nil {\n\t\treturn fmt.Errorf(\"configured network_interface %q does not exist: %w\", intfName, err)\n\t}\n}","typeGuard":null,"tryCatchPattern":"if err := fp.Fingerprint(req); err != nil {\n\tif strings.Contains(err.Error(), \"Error while detecting network interface\") {\n\t\tlog.Printf(\"network fingerprint failed: %v\", err)\n\t\treturn nil\n\t}\n\treturn err\n}","preventionTips":["Validate network_interface against `ip link` output at deploy time.","Prefer explicit interface names over auto-detection in containers/VMs.","Re-validate config after network reconfigurations or host migration.","Confirm the interface exists before client startup in init scripts."],"tags":["network","fingerprinting","configuration"],"backgroundTag":"network-interface-not-found","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}