{"record":{"id":"2be6e8bce5265b44","repo":"hyperledger/fabric","slug":"failed-pulling-block-d","errorCode":null,"errorMessage":"failed pulling block %d","messagePattern":"failed pulling block (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/consensus/smartbft/synchronizer.go","lineNumber":141,"sourceCode":"\t\t\tbreak\n\t\t}\n\t\tif protoutil.IsConfigBlock(block) {\n\t\t\ts.Support.WriteConfigBlock(block, nil)\n\t\t} else {\n\t\t\ts.Support.WriteBlockSync(block, nil)\n\t\t}\n\t\ts.Logger.Debugf(\"Fetched and committed block [%d] from cluster\", seq)\n\t\tlastPulledBlock = block\n\n\t\tprevInLatestDecision := s.lastReconfig.InLatestDecision\n\t\ts.lastReconfig = s.OnCommit(lastPulledBlock)\n\t\ts.lastReconfig.InLatestDecision = s.lastReconfig.InLatestDecision || prevInLatestDecision\n\t\tseq++\n\t\tblocksFetched++\n\t}\n\n\tif lastPulledBlock == nil {\n\t\treturn nil, errors.Errorf(\"failed pulling block %d\", seq)\n\t}\n\n\ts.Logger.Infof(\"Finished synchronizing with cluster, fetched %d blocks, starting from block [%d], up until and including block [%d]\",\n\t\tblocksFetched, startHeight, lastPulledBlock.Header.Number)\n\n\tviewMetadata, lastConfigSqn := s.getViewMetadataLastConfigSqnFromBlock(lastPulledBlock)\n\n\ts.Logger.Infof(\"Returning view metadata of %v, lastConfigSeq %d\", viewMetadata, lastConfigSqn)\n\treturn s.BlockToDecision(lastPulledBlock), nil\n}\n\n// computeTargetHeight compute the target height to synchronize to.\n//\n// heights: a slice containing the heights of accessible peers, length must be >0.\n// clusterSize: the cluster size, must be >0.\nfunc (s *Synchronizer) computeTargetHeight(heights []uint64) uint64 {\n\tsort.Slice(heights, func(i, j int) bool { return heights[i] > heights[j] }) // Descending\n\tclusterSize := len(s.Support.SharedConfig().Consenters())","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/consensus/smartbft/synchronizer.go#L123-L159","documentation":"Raised in Synchronizer.synchronize when the block-pulling loop finished but lastPulledBlock is nil — i.e. PullBlock(seq) failed on the very first sequence (startHeight), so no block at all could be fetched from any remote consenter. It reports the sequence number that could not be pulled.","triggerScenarios":"blockPuller.PullBlock(seq) returned nil for the first needed seq (targetSeq >= seq >= startHeight), typically because all remote endpoints refused the Deliver request, blocks at that height were unavailable (peers pruned/behind), or connection failures interrupted the pull before any block arrived.","commonSituations":"Remote orderers have lower heights than reported earlier (stale height probe); TLS/authorization failure on the Deliver stream; this node is ahead of peers so requested seq doesn't exist remotely; transient network outage during sync.","solutions":["Check the wrapped/preceding log lines for the Deliver connection failure on the reported sequence","Verify remote peers actually have the requested block height (their ledgers are not behind startHeight)","Fix TLS/endpoint reachability for the cluster delivery service","Retry synchronization once peers are reachable and caught up"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Confirm peers have the needed height before pulling\nneededSeq := localHeight\nfor _, ep := range endpoints {\n    if peerHeight(ep) >= neededSeq+1 { /* this peer can serve the block */ }\n}","typeGuard":null,"tryCatchPattern":"resp := synchronizer.Sync()\n// Sync falls back to local ledger on error; retry after connectivity is restored\nif syncFailed(resp) {\n    time.Sleep(backoff)\n    resp = synchronizer.Sync() // retriable: transient deliver failures\n}","preventionTips":["Verify remote peers retain blocks at the requested heights (no aggressive pruning)","Fix Deliver-service TLS/authorization before the node falls far behind","Alert when a node's height lags the cluster to trigger sync during healthy windows","Monitor transient network errors on the cluster port"],"tags":["consensus","smartbft","fabric","network","block-replication"],"backgroundTag":"block-pull-failed","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"}