{"record":{"id":"ddb2cb8eba7c1678","repo":"hashicorp/nomad","slug":"failed-to-parse-signal-v-ddb2cb","errorCode":null,"errorMessage":"failed to parse signal: %v","messagePattern":"failed to parse signal: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/docker/handle.go","lineNumber":131,"sourceCode":"\t\treturn nil, err\n\t}\n\tdefer hijacked.Close()\n\n\texecResult.Stdout = stdout.Bytes()\n\texecResult.Stderr = stderr.Bytes()\n\tres, err := h.dockerClient.ExecInspect(ctx, exec.ID, mclient.ExecInspectOptions{})\n\tif err != nil {\n\t\treturn execResult, fmt.Errorf(\"failed to inspect exit code of exec object: %w\", err)\n\t}\n\n\texecResult.ExitResult.ExitCode = res.ExitCode\n\treturn execResult, nil\n}\n\nfunc (h *taskHandle) Signal(ctx context.Context, s string) error {\n\t_, err := signals.Parse(s)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to parse signal: %v\", err)\n\t}\n\n\t_, err = h.dockerClient.ContainerKill(ctx, h.containerID, mclient.ContainerKillOptions{Signal: s})\n\treturn err\n}\n\n// parseSignal interprets the signal name into an os.Signal. If no name is\n// provided, the docker driver defaults to SIGTERM. If the OS is Windows and\n// SIGINT is provided, the signal is converted to SIGTERM.\nfunc parseSignal(os, signal string) (os.Signal, error) {\n\t// Unlike other drivers, docker defaults to SIGTERM, aiming for consistency\n\t// with the 'docker stop' command.\n\t// https://docs.docker.com/engine/reference/commandline/stop/#extended-description\n\tif signal == \"\" {\n\t\tsignal = \"SIGTERM\"\n\t}\n\n\t// Windows Docker daemon does not support SIGINT, SIGTERM is the semantic equivalent that","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/drivers/docker/handle.go#L113-L149","documentation":"Before sending a signal to the container, taskHandle.Signal validates the signal string with signals.Parse (Nomad's cross-platform signal parser). If the string is not a recognized signal name (e.g. 'SIGUSR9'), the signal is never sent and this error is returned.","triggerScenarios":"The 'signal' parameter passed to the driver's Signal API (from a task's kill_signal, template change_mode signal, or nomad alloc signal command) is not a valid signal name for signals.Parse, such as 'USR1' without a recognized prefix form or a completely unknown name.","commonSituations":"Typo in the job spec's kill_signal; using a numeric signal ('9') where the parser expects names; using a Windows-incompatible signal; custom scripts calling nomad alloc signal with an invalid value.","solutions":["Use a canonical signal name supported by Nomad, e.g. 'SIGTERM', 'SIGHUP', 'SIGUSR1'.","Fix the task's kill_signal field in the job spec and redeploy.","Check the signal you pass to 'nomad alloc signal' against Nomad's documented signal list."],"exampleFix":"// before (job hcl)\nkill_signal = \"TERM15\"\n// after\nkill_signal = \"SIGTERM\"","handlingStrategy":"validation","validationCode":"var validSignals = map[string]bool{\n    \"SIGABRT\": true, \"SIGALRM\": true, \"SIGFPE\": true, \"SIGHUP\": true,\n    \"SIGILL\": true, \"SIGINT\": true, \"SIGIO\": true, \"SIGKILL\": true,\n    \"SIGPIPE\": true, \"SIGQUIT\": true, \"SIGSEGV\": true, \"SIGTERM\": true,\n    \"SIGUSR1\": true, \"SIGUSR2\": true,\n}\nif !validSignals[s] {\n    return fmt.Errorf(\"unsupported signal %q\", s)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use full canonical names (SIGTERM not TERM15 or 9) in job specs.","Validate kill_signal in your job-spec linting pipeline.","Check Nomad's supported signal list per target OS."],"tags":["docker-driver","signal","validation"],"backgroundTag":"invalid-signal-name","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"}