{"record":{"id":"75826b18db3d6114","repo":"hashicorp/nomad","slug":"missing-required-value-timeout-timeout-cannot-be","errorCode":null,"errorMessage":"missing required value timeout. Timeout cannot be less than %v","messagePattern":"missing required value timeout\\. Timeout cannot be less than (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/services.go","lineNumber":293,"sourceCode":"\t\tif checkPath.IsAbs() {\n\t\t\treturn fmt.Errorf(\"http type must have relative http path\")\n\t\t}\n\tcase ServiceCheckScript:\n\t\tif sc.Command == \"\" {\n\t\t\treturn fmt.Errorf(\"script type must have a valid script path\")\n\t\t}\n\t}\n\n\t// validate interval\n\tif sc.Interval == 0 {\n\t\treturn fmt.Errorf(\"missing required value interval. Interval cannot be less than %v\", minCheckInterval)\n\t} else if sc.Interval < minCheckInterval {\n\t\treturn fmt.Errorf(\"interval (%v) cannot be lower than %v\", sc.Interval, minCheckInterval)\n\t}\n\n\t// validate timeout\n\tif sc.Timeout == 0 {\n\t\treturn fmt.Errorf(\"missing required value timeout. Timeout cannot be less than %v\", minCheckInterval)\n\t} else if sc.Timeout < minCheckTimeout {\n\t\treturn fmt.Errorf(\"timeout (%v) is lower than required minimum timeout %v\", sc.Timeout, minCheckInterval)\n\t}\n\n\t// validate the initial status\n\tswitch sc.InitialStatus {\n\tcase \"\":\n\tcase api.HealthPassing:\n\tcase api.HealthWarning:\n\tcase api.HealthCritical:\n\tdefault:\n\t\treturn fmt.Errorf(`invalid initial check state (%s), must be one of %q, %q, %q or empty`, sc.InitialStatus, api.HealthPassing, api.HealthWarning, api.HealthCritical)\n\t}\n\n\t// validate address_mode\n\tswitch sc.AddressMode {\n\tcase \"\", AddressModeHost, AddressModeDriver, AddressModeAlloc, AddressModeAllocIPv6:\n\t\t// Ok","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/services.go#L275-L311","documentation":"The service check defines no `timeout` (zero value); validateCommon requires a timeout of at least the minimum duration so checks cannot hang indefinitely.","triggerScenarios":"Thrown at nomad/structs/services.go:293 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set timeout on the check to at least the minimum (e.g. a few seconds above the expected probe time)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}