{"record":{"id":"69009a23c7191cac","repo":"hashicorp/nomad","slug":"task-s-does-not-support-q-networking-mode","errorCode":null,"errorMessage":"task %s does not support %q networking mode","messagePattern":"task (.+?) does not support %q networking mode","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/allocrunner/network_manager_linux.go","lineNumber":80,"sourceCode":"\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 != \"\" {\n\t\t\t\treturn nil, fmt.Errorf(\"tasks %s and %s want to initiate networking but only one driver can do so\", networkInitiator, task.Name)\n\t\t\t}\n\t\t\tnetManager, ok := driver.(drivers.DriverNetworkManager)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"driver %s does not implement network management RPCs\", task.Driver)\n\t\t\t}\n\n\t\t\tnm = netManager\n\t\t\tnetworkInitiator = task.Name\n\t\t} else if len(tg.Networks) > 0 && tg.Networks[0].Hostname != \"\" {\n\t\t\t// TODO jrasell: remove once the default linux network manager\n\t\t\t//  supports setting the hostname in bridged mode. This currently","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/allocrunner/network_manager_linux.go#L62-L98","documentation":"newNetworkManager maps the task group's requested network mode (e.g. bridge, host, none) to a network isolation mode and checks the driver advertises it via caps.HasNetIsolationMode. When the driver does not support the requested mode, this error names the task and the unsupported mode.","triggerScenarios":"A task group declares group 'network { mode = \"bridge\" }' (or similar) but a task's driver does not list the corresponding NetIsolationMode in its Capabilities, e.g. a non-DriverNetworkManager-capable custom driver used with bridge networking.","commonSituations":"Using bridge networking with a driver that only supports host/netns isolation; scheduling a group-network job onto a node whose driver version predates network isolation capability reporting; requesting \"bridge\" mode for exec/java tasks whose driver caps don't include it.","solutions":["Change the group network mode to one the driver supports (e.g. mode = \"host\"), or remove the group network block.","Use a driver that supports the requested isolation mode (docker supports bridge).","Upgrade the driver/Nomad on the node so capabilities include the needed isolation mode.","Check driver capabilities via 'nomad node status -verbose' / plugin docs before scheduling."],"exampleFix":"// before\nnetwork {\n  mode = \"bridge\"\n}\n// after\nnetwork {\n  mode = \"host\"\n}","handlingStrategy":"validation","validationCode":"// job-level pre-check\n// group network mode must be supported by every initiating driver\nif mode == \"bridge\" && driver != \"docker\" { reject() }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only request bridge group networking with drivers that document isolation-mode support.","Check 'nomad node status -verbose' driver capabilities before rollout.","Add job validation linting for network.mode vs driver combos."],"tags":["nomad","network-mode","driver-capabilities","bridge"],"backgroundTag":"unsupported-network-isolation-mode","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"}