hashicorp/nomad · error · errDisabledDriver

raw_exec is disabled

Error message

raw_exec is disabled

What it means

Package-level sentinel errDisabledDriver in the rawexec driver: StartTask returns it whenever the driver's Enabled config is false, telling the task runner the driver is administratively disabled on this client.

Source

Thrown at drivers/rawexec/driver.go:61

	taskHandleVersion = 1
)

var (
	// PluginID is the rawexec plugin metadata registered in the plugin
	// catalog.
	PluginID = loader.PluginID{
		Name:       pluginName,
		PluginType: base.PluginTypeDriver,
	}

	// PluginConfig is the rawexec factory function registered in the
	// plugin catalog.
	PluginConfig = &loader.InternalPluginConfig{
		Config:  map[string]interface{}{},
		Factory: func(ctx context.Context, l hclog.Logger) interface{} { return NewRawExecDriver(ctx, l) },
	}

	errDisabledDriver = fmt.Errorf("raw_exec is disabled")
)

// PluginLoader maps pre-0.9 client driver options to post-0.9 plugin options.
func PluginLoader(opts map[string]string) (map[string]interface{}, error) {
	conf := map[string]interface{}{}
	if v, err := strconv.ParseBool(opts["driver.raw_exec.enable"]); err == nil {
		conf["enabled"] = v
	}
	return conf, nil
}

var (
	// pluginInfo is the response returned for the PluginInfo RPC
	pluginInfo = &base.PluginInfoResponse{
		Type:              base.PluginTypeDriver,
		PluginApiVersions: []string{drivers.ApiVersion010},
		PluginVersion:     "0.1.0",
		Name:              pluginName,

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Enable the driver in the client config: plugin "raw_exec" { config { enabled = true } } and restart the client
  2. If raw_exec should stay off, change the job to another driver (exec, java, docker)
  3. Check client logs / `nomad node status -verbose` to confirm raw_exec driver state
  4. For pre-0.9 style configs, set driver.raw_exec.enable=true which PluginLoader maps to the plugin config

Example fix

// before (client.hcl)
# plugin "raw_exec" not configured -> disabled
// after
plugin "raw_exec" {
  config {
    enabled = true
  }
}
Defensive patterns

Strategy: validation

Validate before calling

// client.hcl must contain:
// plugin "raw_exec" { config { enabled = true } }
// verify: nomad node status -verbose | grep raw_exec

Try / catch

_, _, err := harness.StartTask(task)
if err == errDisabledDriver || (err != nil && strings.Contains(err.Error(), "raw_exec is disabled")) {
    // instruct operator to enable raw_exec in client config
}

Prevention

When it happens

Trigger: Submitting/starting a raw_exec task on a client whose config lacks `plugin "raw_exec" { config { enabled = true } }`, or where enabled was explicitly set to false; also asserted in TestRawExecDriver_Disabled.

Common situations: Fresh Nomad client installs where raw_exec was never enabled; operator disabled raw_exec for security; clients migrated from pre-0.9 using driver.raw_exec.enable option mapping via PluginLoader.

Related errors


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