hashicorp/nomad · warning
failed to find %s: %v
Error message
failed to find %s: %v
What it means
The BridgeFingerprint's findDir checks for the existence of /sys/module/<name> to detect whether the bridge kernel module is loaded/built-in. This error means os.Stat on that sysfs directory failed (typically ENOENT). It is one of several accumulated errors from detect(); a non-nil result just disables the bridge network mode fingerprint (resp.Detected=false), it does not fail the client.
Source
Thrown at client/fingerprint/bridge_linux.go:102
errs = multierror.Append(errs, err)
} else {
return nil
}
// check if the module is dynamic but unloaded (will have a dep entry)
dependsPath := fmt.Sprintf("/lib/modules/%s/modules.dep", hostInfo.KernelVersion)
if err := f.searchFile(module, dependsPath, f.regexp(dependsModuleRe, module)); err != nil {
errs = multierror.Append(errs, err)
} else {
return nil
}
return errs
}
func (f *BridgeFingerprint) findDir(dirname string) error {
if _, err := os.Stat(dirname); err != nil {
return fmt.Errorf("failed to find %s: %v", dirname, err)
} else {
return nil
}
}
func (f *BridgeFingerprint) searchFile(module, filename string, re *regexp.Regexp) error {
file, err := os.Open(filename)
if err != nil {
return fmt.Errorf("failed to open %s: %v", filename, err)
}
defer func() {
_ = file.Close()
}()
scanner := bufio.NewScanner(file)
for scanner.Scan() {
if re.MatchString(scanner.Text()) {
return nil // found the module!View on GitHub (pinned to 482b49bf1a)
Solutions
- Load the module on the host: run 'modprobe bridge' and ensure it persists across reboots (e.g. /etc/modules-load.d/bridge.conf).
- Verify the host kernel has bridge support: check 'ls /sys/module/bridge' and 'grep bridge /proc/modules'.
- If running Nomad inside a container, run it on the host or mount /sys so module info is visible.
- If bridge networking is not needed, ignore this - the fingerprint simply marks the node as not supporting bridge mode.
Example fix
# before (module missing) $ ls /sys/module/bridge ls: cannot access '/sys/module/bridge': No such file or directory # after $ sudo modprobe bridge && echo bridge | sudo tee /etc/modules-load.d/bridge.conf $ ls /sys/module/bridge parameters refcnt uevent
Defensive patterns
Strategy: fallback
Validate before calling
// host-side preflight (shell) // test -d /sys/module/bridge || echo 'bridge module not loaded; run: modprobe bridge'
Try / catch
if err := f.detect(bridgeKernelModuleName); err != nil {
// library already does this: log and disable bridge mode rather than failing
f.logger.Warn("bridge network mode disabled", "error", err)
return nil // resp.Detected stays false
} Prevention
- Provision bridge module loading in host images: /etc/modules-load.d/bridge.conf with 'modprobe bridge'.
- Run Nomad on the host (or with /sys visible) rather than inside restricted containers.
- Treat the fingerprint warning as expected on hosts that don't use Nomad bridge networking.
When it happens
Trigger: detect('bridge') calls findDir("/sys/module/bridge") and the directory does not exist - the bridge module is neither loaded nor built into the running kernel, or the host lacks the /sys/module entry.
Common situations: Minimal/containerized hosts (e.g. running Nomad in a container with a restricted /sys) where the module dir is not visible; kernel built without bridge support (e.g. some VM appliances); module available but not yet loaded and not present in modules.dep.
Related errors
- module %s not in %s
- failed to open %s: %v
- failed to scan %s: %v
- fingerprint name cannot be empty
- empty response from AWS metadata
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/9e1a4ec9fc0025d2.
Report an issue: GitHub.