{"record":{"id":"a2f6941da209c3f9","repo":"hashicorp/nomad","slug":"failed-to-create-executor-v-a2f694","errorCode":null,"errorMessage":"failed to create executor: %v","messagePattern":"failed to create executor: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"drivers/rawexec/driver.go","lineNumber":429,"sourceCode":"\tif err := d.Validate(*cfg); err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failed driver config validation: %v\", err)\n\t}\n\n\td.logger.Info(\"starting task\", \"driver_cfg\", hclog.Fmt(\"%+v\", driverConfig))\n\thandle := drivers.NewTaskHandle(taskHandleVersion)\n\thandle.Config = cfg\n\n\tpluginLogFile := filepath.Join(cfg.TaskDir().Dir, \"executor.out\")\n\texecutorConfig := &executor.ExecutorConfig{\n\t\tLogFile:  pluginLogFile,\n\t\tLogLevel: \"debug\",\n\t\tCompute:  d.compute,\n\t}\n\n\tlogger := d.logger.With(\"task_name\", handle.Config.Name, \"alloc_id\", handle.Config.AllocID)\n\texec, pluginClient, err := executor.CreateExecutor(logger, d.nomadConfig, executorConfig)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failed to create executor: %v\", err)\n\t}\n\n\texecCmd := &executor.ExecCommand{\n\t\tCmd:              driverConfig.Command,\n\t\tArgs:             driverConfig.Args,\n\t\tEnv:              d.buildEnvList(&driverConfig, cfg),\n\t\tUser:             cfg.User,\n\t\tTaskDir:          cfg.TaskDir().Dir,\n\t\tWorkDir:          driverConfig.WorkDir,\n\t\tStdoutPath:       cfg.StdoutPath,\n\t\tStderrPath:       cfg.StderrPath,\n\t\tNetworkIsolation: cfg.NetworkIsolation,\n\t\tResources:        cfg.Resources.Copy(),\n\t\tOverrideCgroupV2: driverConfig.OverrideCgroupV2,\n\t\tOverrideCgroupV1: driverConfig.OverrideCgroupV1,\n\t\tOOMScoreAdj:      int32(driverConfig.OOMScoreAdj),\n\t}\n","sourceCodeStart":411,"sourceCodeEnd":447,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/drivers/rawexec/driver.go#L411-L447","documentation":"executor.CreateExecutor failed to launch the executor as a go-plugin subprocess (executor plugin binary + nomad config). The driver never got a working executor client, so the task cannot be started. Causes are typically missing plugin binary, bad d.nomadConfig, or handshake/fork failures.","triggerScenarios":"StartTask calls executor.CreateExecutor and the go-plugin spawn fails: nomad executor binary not found/unlaunchable, plugin handshake timeout, insufficient permissions, or invalid NomadConfig.","commonSituations":".nomad data_dir or plugin dir misconfigured; fork/exec failures from cgroup/namespace restrictions in containers; host resource exhaustion (no fds/pids/memory); SELinux/AppArmor blocking plugin exec; version mismatch between client agent and executor plugin.","solutions":["Check agent logs immediately above this error for the go-plugin handshake detail","Verify the nomad binary/executor plugin is present and executable on the client and versions match","Confirm data_dir and plugin configuration are correct and writable by the nomad user","Check OS-level blockers: ulimits (nproc/nofile), SELinux/AppArmor, container seccomp profiles blocking clone/fork","Retry after freeing resources (pids/memory) if the host was exhausted"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// preflight on client host\ntest -x $(which nomad) || echo \"executor plugin binary missing\"\nulimit -u; ulimit -n   # ensure pid/fd headroom\nls -ld <data_dir>     # writable by nomad user?","typeGuard":null,"tryCatchPattern":"h, net, err := d.StartTask(cfg)\nif err != nil && strings.Contains(err.Error(), \"failed to create executor\") {\n  // transient resource issues can be retried once\n  return retryStartTask(cfg, 1)\n}","preventionTips":["Keep nomad binary and executor plugin versions in lockstep","Monitor ulimits (nproc/nofile) and host pids/memory","Review SELinux/AppArmor/seccomp policies on containerized clients","Ensure data_dir and plugin paths are correct and writable"],"tags":["nomad","rawexec","executor","plugin","subprocess"],"backgroundTag":"executor-plugin-launch-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"}