{"record":{"id":"b8912f6494e928ff","repo":"hashicorp/nomad","slug":"failed-to-dispense-driver-s-v","errorCode":null,"errorMessage":"failed to dispense driver %s: %v","messagePattern":"failed to dispense driver (.+?): (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/allocrunner/network_manager_linux.go","lineNumber":68,"sourceCode":"\t\t// the task's netmode defaults to the task group but can be overridden\n\t\ttaskNetMode := tgNetMode\n\t\tif len(task.Resources.Networks) > 0 && task.Resources.Networks[0].Mode != \"\" {\n\t\t\ttaskNetMode = task.Resources.Networks[0].Mode\n\t\t}\n\n\t\t// netmode host should always work to support backwards compat\n\t\tif taskNetMode == \"host\" {\n\t\t\tcontinue\n\t\t}\n\n\t\t// check to see if capabilities of this task's driver have already been checked\n\t\tif _, ok := driverCaps[task.Driver]; ok {\n\t\t\tcontinue\n\t\t}\n\n\t\tdriver, err := driverManager.Dispense(task.Driver)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to dispense driver %s: %v\", task.Driver, err)\n\t\t}\n\n\t\tcaps, err := driver.Capabilities()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to retrieve capabilities for driver %s: %v\",\n\t\t\t\ttask.Driver, err)\n\t\t}\n\n\t\t// check that the driver supports the requested network isolation mode\n\t\tnetIsolationMode := netModeToIsolationMode(taskNetMode)\n\t\tif !caps.HasNetIsolationMode(netIsolationMode) {\n\t\t\treturn nil, fmt.Errorf(\"task %s does not support %q networking mode\", task.Name, taskNetMode)\n\t\t}\n\n\t\t// check if the driver needs to create the network and if a different\n\t\t// driver has already claimed it needs to initiate the network\n\t\tif caps.MustInitiateNetwork {\n\t\t\tif networkInitiator != \"\" {","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/allocrunner/network_manager_linux.go#L50-L86","documentation":"In newNetworkManager, Nomad dispenses the plugin driver for each task group driver via driverManager.Dispense(task.Driver). If the driver plugin cannot be loaded/started (RPC to the driver plugin fails, plugin binary missing, plugin crashed), this error wraps the underlying cause so the allocation's network setup fails immediately.","triggerScenarios":"driverManager.Dispense(task.Driver) returns an error while iterating task group drivers that have not yet been capability-checked: driver plugin not running/registered, unknown driver name in the task group, or the plugin process fails to launch.","commonSituations":"Typo'd driver name in the job spec (e.g. 'dockr'); external driver plugin binary missing from plugin_dir or failing to start on the node; plugin crashed after registration; driver disabled in client config.","solutions":["Fix the driver name in the job's task 'driver' field (check spelling against drivers registered on the client).","Verify the driver plugin binary exists in the client's plugin_dir and is executable.","Check client logs for the driver plugin failing to register (plugin handshake/launch errors).","Ensure the driver is not disabled in client config (plugin stanza / driver allowlist).","Confirm the node has the driver marked healthy in 'nomad node status' before scheduling."],"exampleFix":"// before\ndriver = \"dockr\"\n// after\ndriver = \"docker\"","handlingStrategy":"validation","validationCode":"// before submitting a job with group networking\ndrivers, _, _ := client.Nodes().Info(nodeID) // check Node.Drivers[driverName].Detected && .Healthy\n","typeGuard":"func driverDetected(n *api.Node, name string) bool {\n  d, ok := n.Drivers[name]\n  return ok && d.Detected && d.Healthy\n}","tryCatchPattern":null,"preventionTips":["Validate driver names in CI against the client's detected driver list.","Keep driver plugin binaries installed and supervised via systemd on every client.","Use node metadata/constraints (driver.docker != null) so jobs only land where the driver exists."],"tags":["nomad","driver","plugin-dispense","network-setup"],"backgroundTag":"driver-plugin-dispense-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"}