{"record":{"id":"16d277e4e27a2cab","repo":"hyperledger/fabric","slug":"failed-computing-orderer-addresses","errorCode":null,"errorMessage":"failed computing orderer addresses","messagePattern":"failed computing orderer addresses","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"discovery/support/config/support.go","lineNumber":83,"sourceCode":"\t\tMsps:     make(map[string]*msp.FabricMSPConfig),\n\t\tOrderers: make(map[string]*discovery.Endpoints),\n\t}\n\tordererGrp := config.ChannelGroup.Groups[channelconfig.OrdererGroupKey].Groups\n\tappGrp := config.ChannelGroup.Groups[channelconfig.ApplicationGroupKey].Groups\n\n\tvar globalEndpoints []string\n\tglobalOrderers := config.ChannelGroup.Values[channelconfig.OrdererAddressesKey]\n\tif globalOrderers != nil {\n\t\tordererAddressesConfig := &common.OrdererAddresses{}\n\t\tif err := proto.Unmarshal(globalOrderers.Value, ordererAddressesConfig); err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"failed unmarshalling orderer addresses\")\n\t\t}\n\t\tglobalEndpoints = ordererAddressesConfig.Addresses\n\t}\n\n\tordererEndpoints, err := computeOrdererEndpoints(ordererGrp, globalEndpoints)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed computing orderer addresses\")\n\t}\n\tres.Orderers = ordererEndpoints\n\n\tif err := appendMSPConfigs(ordererGrp, appGrp, res.Msps); err != nil {\n\t\treturn nil, errors.WithStack(err)\n\t}\n\treturn res, nil\n}\n\nfunc computeOrdererEndpoints(ordererGrp map[string]*common.ConfigGroup, globalOrdererAddresses []string) (map[string]*discovery.Endpoints, error) {\n\tendpointsByMSPID, err := perOrgEndpointsByMSPID(ordererGrp)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar somePerOrgEndpoint bool\n\tfor _, perOrgEndpoints := range endpointsByMSPID {\n\t\tif len(perOrgEndpoints) > 0 {","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/discovery/support/config/support.go#L65-L101","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before (configtx.yaml)\n# Orderer: (no Addresses set)\n// after\nOrderer:\n  OrdererType: etcdraft\n  Addresses:\n    - orderer.example.com:7050","handlingStrategy":"try-catch","validationCode":"// check channel config exposes orderer endpoints before discovery\nif len(ordererEndpointsInConfig) == 0 {\n    return errors.New(\"channel config has no orderer endpoints\")\n}","typeGuard":null,"tryCatchPattern":"res, err := client.Send(ctx, req)\nif err != nil {\n    if strings.Contains(err.Error(), \"failed computing orderer addresses\") {\n        // inspect inner error; add orderer endpoints via config update\n    }\n    return err\n}","preventionTips":["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"],"tags":["fabric","discovery","config","orderer"],"backgroundTag":"missing-orderer-endpoints","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"}