{"record":{"id":"db6181f909c74d35","repo":"hashicorp/nomad","slug":"s-q-was-not-found-in-the-raft-configuration","errorCode":null,"errorMessage":"%s %q was not found in the Raft configuration","messagePattern":"(.+?) %q was not found in the Raft configuration","errorType":"error_code","errorClass":null,"httpStatus":400,"severity":"error","filePath":"nomad/operator_endpoint.go","lineNumber":281,"sourceCode":"\tif err := future.Error(); err != nil {\n\t\treply.Err = err\n\t\treturn err\n\t}\n\n\t// Since this is an operation designed for humans to use, we will return\n\t// an error if the supplied ID or address isn't among the peers since it's\n\t// likely a mistake.\n\tvar found bool\n\tfor _, s := range future.Configuration().Servers {\n\t\tif s.ID == req.ID || s.Address == req.Address {\n\t\t\treply.To = structs.NewRaftIDAddress(s.Address, s.ID)\n\t\t\tfound = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif !found {\n\t\treply.Err = fmt.Errorf(\"%s %q was not found in the Raft configuration\",\n\t\t\tkind, testedVal)\n\t\treturn structs.NewErrRPCCoded(http.StatusBadRequest, reply.Err.Error())\n\t}\n\n\t// Otherwise, this is a no-op, respond accordingly.\n\tif reply.From == reply.To {\n\t\top.logger.Debug(\"leadership transfer to current leader is a no-op\")\n\t\treply.Noop = true\n\t\treturn nil\n\t}\n\n\tlog := op.logger.With(\n\t\t\"to_peer_id\", reply.To.ID, \"to_peer_addr\", reply.To.Address,\n\t\t\"from_peer_id\", reply.From.ID, \"from_peer_addr\", reply.From.Address,\n\t)\n\tif err = op.srv.leadershipTransferToServer(reply.To); err != nil {\n\t\treply.Err = err\n\t\tlog.Error(\"failed transferring leadership\", \"error\", reply.Err.Error())","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/operator_endpoint.go#L263-L299","documentation":"TransferLeadershipToPeer could not match the supplied server ID or address against any server in the current Raft configuration, so it refuses to initiate a leadership transfer to an unknown peer.","triggerScenarios":"Thrown at nomad/operator_endpoint.go:281 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run `nomad operator raft list-peers` and pass an exact ID or address from that list","Verify the region and API endpoint target the intended cluster","Retry with the canonical form of the peer address shown by the CLI"],"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"}