{"record":{"id":"56d459e2efd4fc74","repo":"hashicorp/nomad","slug":"job-lookup-failed-v","errorCode":null,"errorMessage":"job lookup failed: %v","messagePattern":"job lookup failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/state/state_store.go","lineNumber":1824,"sourceCode":"\t} else if !exists {\n\t\treturn fmt.Errorf(\"job %q is in nonexistent namespace %q\", job.ID, job.Namespace)\n\t}\n\n\t// Upgrade path.\n\t// Assert the node pool is set and exists.\n\tif job.NodePool == \"\" {\n\t\tjob.NodePool = structs.NodePoolDefault\n\t}\n\tif exists, err := s.nodePoolExists(txn, job.NodePool); err != nil {\n\t\treturn err\n\t} else if !exists {\n\t\treturn fmt.Errorf(\"job %q is in nonexistent node pool %q\", job.ID, job.NodePool)\n\t}\n\n\t// Check if the job already exists\n\texisting, err := txn.First(\"jobs\", \"id\", job.Namespace, job.ID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"job lookup failed: %v\", err)\n\t}\n\n\tvar existingJob *structs.Job\n\tif existing != nil {\n\t\texistingJob = existing.(*structs.Job)\n\t}\n\n\tif req != nil && req.EnforceIndex {\n\t\tif err := existingJob.EnforceIndex(req.JobModifyIndex); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// Setup the indexes correctly\n\tif existingJob != nil {\n\t\tjob.CreateIndex = existingJob.CreateIndex\n\t\tjob.ModifyIndex = index\n","sourceCodeStart":1806,"sourceCodeEnd":1842,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/state/state_store.go#L1806-L1842","documentation":"The memdb read of the jobs table by namespace/ID failed while registering the job; this wraps the underlying index lookup error used to detect an existing job, indicating a state store access failure.","triggerScenarios":"Thrown at nomad/state/state_store.go:1824 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the registration","Check server logs for state store/memdb errors","Verify the server is a healthy leader or forward to one"],"exampleFix":null,"handlingStrategy":"retry","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"}