{"record":{"id":"a8327b75d51703e2","repo":"hashicorp/nomad","slug":"node-lookup-by-secretid-failed-v","errorCode":null,"errorMessage":"node lookup by SecretID failed: %v","messagePattern":"node lookup by SecretID failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/state/state_store.go","lineNumber":1736,"sourceCode":"func (s *StateStore) NodesByIDPrefix(ws memdb.WatchSet, nodeID string) (memdb.ResultIterator, error) {\n\ttxn := s.db.ReadTxn()\n\n\titer, err := txn.Get(\"nodes\", \"id_prefix\", nodeID)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"node lookup failed: %v\", err)\n\t}\n\tws.Add(iter.WatchCh())\n\n\treturn iter, nil\n}\n\n// NodeBySecretID is used to lookup a node by SecretID\nfunc (s *StateStore) NodeBySecretID(ws memdb.WatchSet, secretID string) (*structs.Node, error) {\n\ttxn := s.db.ReadTxn()\n\n\twatchCh, existing, err := txn.FirstWatch(\"nodes\", \"secret_id\", secretID)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"node lookup by SecretID failed: %v\", err)\n\t}\n\tws.Add(watchCh)\n\n\tif existing != nil {\n\t\treturn existing.(*structs.Node), nil\n\t}\n\treturn nil, nil\n}\n\n// NodesByNodePool returns an iterator over all nodes that are part of the\n// given node pool.\nfunc (s *StateStore) NodesByNodePool(ws memdb.WatchSet, pool string) (memdb.ResultIterator, error) {\n\ttxn := s.db.ReadTxn()\n\n\titer, err := txn.Get(\"nodes\", \"node_pool\", pool)\n\tif err != nil {\n\t\treturn nil, err\n\t}","sourceCodeStart":1718,"sourceCodeEnd":1754,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/state/state_store.go#L1718-L1754","documentation":"NodeBySecretID's memdb lookup by the nodes table's secret_id index returned an error; the wrapped failure means the state store could not perform the read (as opposed to simply not finding the node).","triggerScenarios":"Thrown at nomad/state/state_store.go:1736 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the request against a healthy server","Check server logs for state store errors","Verify Raft/leader health if lookups consistently fail"],"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"}