{"record":{"id":"5664f41964a83d19","repo":"hyperledger/fabric","slug":"no-raft-leader","errorCode":null,"errorMessage":"no Raft leader","messagePattern":"no Raft leader","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/consensus/etcdraft/chain.go","lineNumber":557,"sourceCode":"}\n\n// Submit forwards the incoming request to:\n// - the local run goroutine if this is leader\n// - the actual leader via the transport mechanism\n// The call fails if there's no leader elected yet.\nfunc (c *Chain) Submit(req *orderer.SubmitRequest, sender uint64) error {\n\tif err := c.isRunning(); err != nil {\n\t\tc.Metrics.ProposalFailures.Add(1)\n\t\treturn err\n\t}\n\n\tleadC := make(chan uint64, 1)\n\tselect {\n\tcase c.submitC <- &submit{req, leadC}:\n\t\tlead := <-leadC\n\t\tif lead == raft.None {\n\t\t\tc.Metrics.ProposalFailures.Add(1)\n\t\t\treturn errors.Errorf(\"no Raft leader\")\n\t\t}\n\n\t\tif lead != c.raftID {\n\t\t\tif err := c.forwardToLeader(lead, req); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\tcase <-c.doneC:\n\t\tc.Metrics.ProposalFailures.Add(1)\n\t\treturn errors.Errorf(\"chain is stopped\")\n\t}\n\n\treturn nil\n}\n\nfunc (c *Chain) forwardToLeader(lead uint64, req *orderer.SubmitRequest) error {\n\tc.logger.Infof(\"Forwarding transaction to the leader %d\", lead)","sourceCodeStart":539,"sourceCodeEnd":575,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/consensus/etcdraft/chain.go#L539-L575","documentation":"Returned when a Submit request is delivered to a node that has no known Raft leader (lead == raft.None). The chain forwards the request through the internal submit channel and waits for the current leader; if the Raft group cannot report one (no quorum or election in progress), this error is produced.","triggerScenarios":"Calling orderer Submit/Broadcast while the Raft cluster has no elected leader — e.g. fewer than a majority of ordering nodes are up, an election is still in progress after a leader crash, or the chain is mid-reconfiguration.","commonSituations":"Too many orderer replicas down in a 3- or 5-node cluster (quorum lost); cluster just started and leader election hasn't completed; network partition isolating the follower the client connects to.","solutions":["Check orderer logs for 'leader changed' / 'no leader' and confirm a majority of Raft nodes are online and connected.","Verify network connectivity and TLS certificates between ordering nodes on the Raft port (7050 cluster port).","Wait for the leader election to complete and retry the transaction submission.","If quorum is permanently lost, restore the failed orderer from the same genesis/channel data or re-provision the ordering service."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"meta := &etcdraft.ClusterMetadata{}\nif err := proto.Unmarshal(req.GetMetadata(), meta); err != nil {\n    return nil, fmt.Errorf(\"rejecting step request: invalid cluster metadata: %w\", err)\n}","typeGuard":"func validClusterMetadata(b []byte) bool {\n    m := &etcdraft.ClusterMetadata{}\n    return len(b) > 0 && proto.Unmarshal(b, m) == nil\n}","tryCatchPattern":null,"preventionTips":["Keep all ordering nodes on the same Fabric version.","Never hand-edit consensus metadata bytes.","Use configtxlator to generate and verify metadata.","Reject metadata from non-leader senders early."],"tags":["hyperledger-fabric","etcdraft","raft-leader","consensus"],"backgroundTag":"raft-no-leader","analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}