{"record":{"id":"64b36b6024495438","repo":"hashicorp/nomad","slug":"failed-to-configure-network-manager-v","errorCode":null,"errorMessage":"failed to configure network manager: %v","messagePattern":"failed to configure network manager: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"client/allocrunner/alloc_runner_hooks.go","lineNumber":98,"sourceCode":"\n\t// Broadcast client alloc to listeners\n\ta.ar.allocBroadcaster.Send(calloc)\n}\n\n// initRunnerHooks initializes the runners hooks.\nfunc (ar *allocRunner) initRunnerHooks(config *clientconfig.Config) error {\n\thookLogger := ar.logger.Named(\"runner_hook\")\n\n\t// create health setting shim\n\ths := &allocHealthSetter{ar}\n\n\t// create network isolation setting shim\n\tns := &allocNetworkIsolationSetter{ar: ar}\n\n\t// build the network manager\n\tnm, err := newNetworkManager(ar.Alloc(), ar.driverManager)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to configure network manager: %v\", err)\n\t}\n\n\t// create network configurator\n\tnc, err := newNetworkConfigurator(hookLogger, ar.Alloc(), config)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to initialize network configurator: %v\", err)\n\t}\n\n\t// Create the alloc directory hook. This is run first to ensure the\n\t// directory path exists for other hooks.\n\talloc := ar.Alloc()\n\n\tar.runnerHooks = []interfaces.RunnerHook{\n\t\tnewIdentityHook(hookLogger, ar.widmgr),\n\t\tnewAllocDirHook(hookLogger, ar.allocDir),\n\t\tnewMaxRunDurationHook(hookLogger, alloc, ar.clientBaseLabels, ar.EnforceMaxRunDurationTimeout),\n\t\tnewConsulHook(consulHookConfig{\n\t\t\talloc:                   ar.alloc,","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/allocrunner/alloc_runner_hooks.go#L80-L116","documentation":"During alloc runner hook initialization, newNetworkManager (which selects the networking plugin/mode for the alloc, e.g. bridge or CNI) failed. initRunnerHooks aborts, so the allocation cannot be set up with its network isolation requirements. The underlying cause is wrapped in %v.","triggerScenarios":"newNetworkManager returns error when the alloc requires networking but no suitable network plugin/node driver capability is available — e.g. the node lacks bridge networking support (no cap_net_admin, CNI not configured) while the job uses bridge networking mode.","commonSituations":"Job with `network { mode = \"bridge\" }` scheduled to a node without bridge networking enabled (client config `bridge_network_name`/CNI missing); missing netns/CNI plugins in /opt/cni/bin; running the Nomad agent without root or CAP_NET_ADMIN; driver/plugin not reporting the network-isolation capability.","solutions":["Read the wrapped cause: it names whether bridge/CNI setup or plugin selection failed","Enable bridge networking on the client (Linux kernel modules, nomad agent with root/CAP_NET_ADMIN) and install CNI plugins","Verify the job's network mode is supported by the node's plugins/client config","Reschedule onto a node whose fingerprint reports the required network capability"],"exampleFix":"// before (job) - bridge mode on a node without CNI\nnetwork { mode = \"bridge\" }\n// after - either install CNI plugins + run agent as root, or use host mode\nnetwork { mode = \"host\" }","handlingStrategy":"validation","validationCode":"// before scheduling jobs with mode=\"bridge\", verify client capabilities\nnode, _, _ := client.Nodes().Info(ctx, nodeID, nil)\nfor _, dc := range node.Drivers { _ = dc }\n// ensure CNI binaries exist:\n// ls /opt/cni/bin/bridge && nomad agent runs with CAP_NET_ADMIN","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install CNI plugins and run the Nomad agent with root/CAP_NET_ADMIN on bridge-network nodes","Constrain jobs to nodes that support the requested network mode via constraints","Verify client fingerprint reports bridge networking before deployment"],"tags":["nomad","client","network","cni"],"backgroundTag":"network-manager-init-failed","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"}