hyperledger/fabric · error

missing OrdererConfig in channel config

Error message

missing OrdererConfig in channel config

What it means

The channel config returned by the endorser was parsed successfully, but it contains no Orderer configuration group. GetOrdererEndpointOfChain exists to collect orderer endpoints, so a config without an Orderer group is unusable.

Source

Thrown at internal/peer/common/common.go:282

	if proposalResp.Response.Status != 0 && proposalResp.Response.Status != http.StatusOK {
		return nil, errors.Errorf("error bad proposal response %d: %s", proposalResp.Response.Status, proposalResp.Response.Message)
	}

	// parse config
	channelConfig := &pcommon.Config{}
	if err := proto.Unmarshal(proposalResp.Response.Payload, channelConfig); err != nil {
		return nil, errors.WithMessage(err, "error unmarshalling channel config")
	}

	bundle, err := channelconfig.NewBundle(chainID, channelConfig, cryptoProvider)
	if err != nil {
		return nil, errors.WithMessage(err, "error loading channel config")
	}

	ordererConfig, ok := bundle.OrdererConfig()
	if !ok {
		return nil, errors.New("missing OrdererConfig in channel config")
	}

	var orgAddresses []string
	for orgName, org := range ordererConfig.Organizations() {
		logger.Debugf("Adding endpoints of org `%s`: %v", orgName, org.Endpoints())
		orgAddresses = append(orgAddresses, org.Endpoints()...)
	}

	ordererAddresses := bundle.ChannelConfig().OrdererAddresses()
	if len(orgAddresses) > 0 {
		if len(ordererAddresses) > 0 {
			logger.Warningf("Deprecated global OrdererAddresses exist: %s; ignoring them", ordererAddresses)
		}
		return orgAddresses, nil
	}

	logger.Warningf("Org specific endpoints are missing, returning (deprecated) global OrdererAddresses: %s; ", ordererAddresses)
	return ordererAddresses, nil

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Verify the channel's configtx defines the Orderer group and re-create/update the channel config if missing
  2. Confirm you are querying the correct channel name
  3. Fetch the channel config directly from an orderer and compare the Orderer group contents
  4. Inspect peer logs to confirm which channel config was loaded

Example fix

// before
bundle, err := configtx.NewChannelConfig(channelConfig)
ordererConfig, ok := bundle.OrdererConfig() // may be missing
// after
bundle, err := configtx.NewChannelConfig(channelConfig)
if err != nil { return nil, err }
if _, ok := bundle.OrdererConfig(); !ok { log.Fatal("channel config lacks Orderer group; fix configtx") }
Defensive patterns

Strategy: validation

Validate before calling

// validate channel config contains an Orderer group before use
// fetch config via 'peer channel fetch config' and check the Orderer group exists
// or: bundle, _ := configtx.NewChannelConfig(cfg); _, ok := bundle.OrdererConfig()

Type guard

ordererConfig, ok := bundle.OrdererConfig()
if !ok {
    return errors.New("channel config has no Orderer group")
}

Try / catch

orderers, err := GetOrdererEndpointOfChain(chainID, dc, signer, cp)
if err != nil && strings.Contains(err.Error(), "missing OrdererConfig") {
    return errors.New("channel is misconfigured: regenerate configtx with Orderer group")
}

Prevention

When it happens

Trigger: The fetched channel config (from the peer) lacks the Orderer config group — e.g. the peer returned config of a channel with no orderer section, or the wrong channel's config was fetched.

Common situations: Misconfigured channel where the orderer group was omitted at creation, querying a system/test channel without orderer config, or fetching config from a peer with stale/partial channel configuration.

Related errors


AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04). Data as JSON: /api/errors/2ef913a7b9b1e0e2. Report an issue: GitHub.