{"record":{"id":"78b4fa3216c389a0","repo":"hashicorp/nomad","slug":"invalid-client-config-given","errorCode":null,"errorMessage":"Invalid client config given","messagePattern":"Invalid client config given","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/allocrunner/taskrunner/template/template.go","lineNumber":160,"sourceCode":"\n\t// RenderFunc allows custom rendering of templated data, and overrides the\n\t// Nomad custom RenderFunc used for sandboxing. This is currently used by\n\t// the secrets block to hold all templated data in memory.\n\tRenderFunc renderer.Renderer\n}\n\n// Validate validates the configuration.\nfunc (c *TaskTemplateManagerConfig) Validate() error {\n\tif c == nil {\n\t\treturn fmt.Errorf(\"Nil config passed\")\n\t} else if c.UnblockCh == nil {\n\t\treturn fmt.Errorf(\"Invalid unblock channel given\")\n\t} else if c.Lifecycle == nil {\n\t\treturn fmt.Errorf(\"Invalid lifecycle hooks given\")\n\t} else if c.Events == nil {\n\t\treturn fmt.Errorf(\"Invalid event hook given\")\n\t} else if c.ClientConfig == nil {\n\t\treturn fmt.Errorf(\"Invalid client config given\")\n\t} else if c.TaskDir == \"\" {\n\t\treturn fmt.Errorf(\"Invalid task directory given: %q\", c.TaskDir)\n\t} else if c.EnvBuilder == nil {\n\t\treturn fmt.Errorf(\"Invalid task environment given\")\n\t} else if c.MaxTemplateEventRate == 0 {\n\t\treturn fmt.Errorf(\"Invalid max template event rate given\")\n\t}\n\n\t// Once is a runner config, but in Nomad it is set per template, so all\n\t// templates given to a runner should have the same value for Once.\n\tvar once bool\n\tfor i, t := range c.Templates {\n\t\tif i == 0 {\n\t\t\tonce = t.Once\n\t\t} else if t.Once != once {\n\t\t\treturn fmt.Errorf(\"All templates should have same Once value\")\n\t\t}\n\t}","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/allocrunner/taskrunner/template/template.go#L142-L178","documentation":"Sentinel validation guard in TaskTemplateManagerConfig.Validate: the Client config pointer is nil, meaning the template manager has no client configuration to derive Consul/Vault/template settings from. Raised by NewTaskTemplateManager on an incompletely populated config.","triggerScenarios":"Thrown at client/allocrunner/taskrunner/template/template.go:160 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Populate the Client field of TaskTemplateManagerConfig before calling NewTaskTemplateManager","Verify the client config is loaded and attached in the taskrunner setup path"],"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-08T15:18:49.778Z"}