hyperledger/fabric · error
cannot obtain configuration history retriever, for collectio
Error message
cannot obtain configuration history retriever, for collection <%s> txID <%s> block sequence number <%d> due to <%s>
What it means
To resolve collection configs as of a past block, the retriever asks the committer for a config-history retriever. If that internal dependency cannot be obtained (config history DB unavailable), the error reports the collection, txID, and block sequence with the wrapped cause. It signals a ledger subsystem failure, not a data-mismatch problem.
Source
Thrown at gossip/privdata/dataretriever.go:141
for _, data := range pvtData {
if data.WriteSet == nil {
dr.logger.Warning("Received nil write set for collection tx in block", data.SeqInBlock, "block number", blockNum)
continue
}
// private data doesn't hold rwsets for namespace and collection or
// belongs to different transaction
if !data.Has(dig.Namespace, dig.Collection) || data.SeqInBlock != dig.SeqInBlock {
continue
}
pvtRWSet := dr.extractPvtRWsets(data.WriteSet.NsPvtRwset, dig.Namespace, dig.Collection)
pvtRWSetWithConfig.RWSet = append(pvtRWSetWithConfig.RWSet, pvtRWSet...)
}
confHistoryRetriever, err := dr.committer.GetConfigHistoryRetriever()
if err != nil {
return nil, errors.Errorf("cannot obtain configuration history retriever, for collection <%s>"+
" txID <%s> block sequence number <%d> due to <%s>", dig.Collection, dig.TxId, dig.BlockSeq, err)
}
configInfo, err := confHistoryRetriever.MostRecentCollectionConfigBelow(dig.BlockSeq, dig.Namespace)
if err != nil {
return nil, errors.Errorf("cannot find recent collection config update below block sequence = %d,"+
" collection name = <%s> for chaincode <%s>", dig.BlockSeq, dig.Collection, dig.Namespace)
}
if configInfo == nil {
return nil, errors.Errorf("no collection config update below block sequence = <%d>"+
" collection name = <%s> for chaincode <%s> is available ", dig.BlockSeq, dig.Collection, dig.Namespace)
}
configs := extractCollectionConfig(configInfo.CollectionConfig, dig.Collection)
if configs == nil {
return nil, errors.Errorf("no collection config was found for collection <%s>"+
" namespace <%s> txID <%s>", dig.Collection, dig.Namespace, dig.TxId)
}View on GitHub (pinned to 2736b63f8f)
Solutions
- Check the wrapped error and peer logs for config-history DB open failures.
- Restart the peer to re-initialize ledger providers.
- Run `peer node rebuild-dbs` if the config history DB is corrupted.
- Ensure Fabric version compatibility — the config history DB format changed across releases; upgrade consistently.
Example fix
// before
confHistoryRetriever, err := dr.committer.GetConfigHistoryRetriever()
// after: degrade gracefully when retriever is unavailable
confHistoryRetriever, err := dr.committer.GetConfigHistoryRetriever()
if err != nil {
logger.Warningf("config history unavailable, retrying pull later: %v", err)
return nil, nil // let gossip retry
} Defensive patterns
Strategy: retry
Validate before calling
retriever, err := committer.GetConfigHistoryRetriever()
if err != nil {
return errors.Wrap(err, "config history not ready")
} Type guard
func configHistoryReady(c privdata.Committer) bool {
_, err := c.GetConfigHistoryRetriever()
return err == nil
} Try / catch
retriever, err := committer.GetConfigHistoryRetriever()
if err != nil {
logger.Warningf("config history retriever unavailable (%v), retrying", err)
scheduleRetry()
return
} Prevention
- Keep peer DBs healthy; watch config-history leveldb logs.
- Use consistent Fabric versions across a network upgrade.
- Run rebuild-dbs after restoring from backups.
- Ensure disk health on peer data directories.
When it happens
Trigger: committer.GetConfigHistoryRetriever() returns an error — config history DB not open, corrupted, or ledger provider failure while serving a reconciliation pull for pvt data.
Common situations: Peer starting while pvt-data reconciliation fires; leveldb corruption in the configHistory sub-DB; disk I/O failures; migrations between Fabric versions leaving the DB inconsistent.
Related errors
- blockNum should be greater than 0
- config history for ledger [%s] exists. Incremental import is
- header type is not an endorser transaction
- wasn't able to read ledger height
- wasn't able to obtain private data, block sequence number %d
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/5eec543a0a6c2d08.
Report an issue: GitHub.