hyperledger/fabric · error
failed computing orderer addresses
Error message
failed computing orderer addresses
What it means
After optionally reading global orderer addresses, discovery calls computeOrdererEndpoints to determine the orderer endpoints for the channel. Any failure there (e.g. neither orderer-group endpoints nor global endpoints available) is wrapped with this message, so the config query cannot return orderer information.
Source
Thrown at discovery/support/config/support.go:83
Msps: make(map[string]*msp.FabricMSPConfig),
Orderers: make(map[string]*discovery.Endpoints),
}
ordererGrp := config.ChannelGroup.Groups[channelconfig.OrdererGroupKey].Groups
appGrp := config.ChannelGroup.Groups[channelconfig.ApplicationGroupKey].Groups
var globalEndpoints []string
globalOrderers := config.ChannelGroup.Values[channelconfig.OrdererAddressesKey]
if globalOrderers != nil {
ordererAddressesConfig := &common.OrdererAddresses{}
if err := proto.Unmarshal(globalOrderers.Value, ordererAddressesConfig); err != nil {
return nil, errors.Wrap(err, "failed unmarshalling orderer addresses")
}
globalEndpoints = ordererAddressesConfig.Addresses
}
ordererEndpoints, err := computeOrdererEndpoints(ordererGrp, globalEndpoints)
if err != nil {
return nil, errors.Wrap(err, "failed computing orderer addresses")
}
res.Orderers = ordererEndpoints
if err := appendMSPConfigs(ordererGrp, appGrp, res.Msps); err != nil {
return nil, errors.WithStack(err)
}
return res, nil
}
func computeOrdererEndpoints(ordererGrp map[string]*common.ConfigGroup, globalOrdererAddresses []string) (map[string]*discovery.Endpoints, error) {
endpointsByMSPID, err := perOrgEndpointsByMSPID(ordererGrp)
if err != nil {
return nil, err
}
var somePerOrgEndpoint bool
for _, perOrgEndpoints := range endpointsByMSPID {
if len(perOrgEndpoints) > 0 {View on GitHub (pinned to 2736b63f8f)
Solutions
- Ensure orderer endpoints exist in channel config (either the legacy ChannelGroup OrdererAddresses key or per-orderer Endpoint values)
- Update channel config via configtxgen with correct Orderer settings and apply the update
- Check the wrapped inner error to see whether it is 'no endpoints' vs a parsing failure and fix the corresponding config section
Example fix
// before (configtx.yaml)
# Orderer: (no Addresses set)
// after
Orderer:
OrdererType: etcdraft
Addresses:
- orderer.example.com:7050 Defensive patterns
Strategy: try-catch
Validate before calling
// check channel config exposes orderer endpoints before discovery
if len(ordererEndpointsInConfig) == 0 {
return errors.New("channel config has no orderer endpoints")
} Try / catch
res, err := client.Send(ctx, req)
if err != nil {
if strings.Contains(err.Error(), "failed computing orderer addresses") {
// inspect inner error; add orderer endpoints via config update
}
return err
} Prevention
- Define Orderer.Addresses or per-orderer Endpoint values in configtx.yaml
- Validate the channel config with configtxlator after every update
- Keep Fabric client and peer versions compatible re: endpoint config format
When it happens
Trigger: computeOrdererEndpoints returns an error — typically the channel's orderer group lacks OrdererAddresses/Endpoint values AND the global ChannelGroup orderer addresses key was absent, leaving no endpoints to expose.
Common situations: Newer Fabric channel configs that use per-orderer Endpoint fields but discovery expecting the addresses key; channels created without any orderer addresses configured; configtx.yaml missing Orderer.Addresses / orderer endpoint definitions.
Related errors
- could not get last config for channel %s
- failed unmarshalling orderer addresses
- Error reading configuration: %s
- Error unmarshalling config into struct: %s
- the block isn't a system channel block because it lacks Cons
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/16d277e4e27a2cab.
Report an issue: GitHub.