hashicorp/nomad · info

module not in

Error message

module %s not in %s

What it means

searchFile successfully opened and scanned the kernel metadata file but found no line matching the bridge module - the file is readable, the module just isn't listed in it. This is the expected outcome when the bridge module is neither loaded, nor built-in, nor available as a loadable module on the host. detect() aggregates it with the other probe errors and the fingerprint simply reports the node as not supporting bridge networking.

Solutions

  1. Install the bridge module package for the kernel (e.g. linux-modules-extra on RHEL-family) so modules.dep lists it.
  2. Load it persistently: 'sudo modprobe bridge' and add 'bridge' to /etc/modules-load.d/bridge.conf.
  3. Confirm with 'grep bridge /lib/modules/$(uname -r)/modules.dep'.
  4. If you don't need Nomad bridge networking mode, ignore - only nodes advertising bridge mode require the module.

Example fix

# before (module absent from all kernel metadata)
$ grep bridge /lib/modules/$(uname -r)/modules.dep
(no output)
# after
$ sudo apt-get install linux-modules-extra-$(uname -r)  # or distro equivalent
$ sudo modprobe bridge
$ grep bridge /lib/modules/$(uname -r)/modules.dep
kernel/net/bridge/bridge.ko: ...
Defensive patterns

Strategy: fallback

Validate before calling

# host preflight (shell): confirm the module is available somewhere before enabling bridge networking
# grep -q '^bridge' /proc/modules || grep -q bridge /lib/modules/$(uname -r)/modules.builtin || grep -q bridge /lib/modules/$(uname -r)/modules.dep || echo 'bridge module unavailable'

Try / catch

if err := f.detect(bridgeKernelModuleName); err != nil {
    // not detected: continue without bridge networking capability
    f.logger.Info("bridge kernel module unavailable, bridge networking not advertised")
    return nil
}

Prevention

When it happens

Trigger: detect('bridge') runs all four probes: /sys/module/bridge missing, 'bridge' not in /proc/modules, not in modules.builtin, not in modules.dep - then findDir/searchFile failures are returned as a combined multierror whose members include this message.

Common situations: Hosts or appliance kernels compiled without the bridge module and without it in modules.dep; heavily stripped VM images; nodes where bridging is unnecessary (the warning is informational).

Related errors


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

Appendix: source

Thrown at client/fingerprint/bridge_linux.go:127

	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!
		}
	}
	if err := scanner.Err(); err != nil {
		return fmt.Errorf("failed to scan %s: %v", filename, err)
	}

	return fmt.Errorf("module %s not in %s", module, filename)
}

View on GitHub (pinned to 482b49bf1a)