{"record":{"id":"eb0d69d66b0a3649","repo":"hyperledger/fabric","slug":"channel-s-doesn-t-exist-eb0d69","errorCode":null,"errorMessage":"channel %s doesn't exist","messagePattern":"channel (.+?) doesn't exist","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/common/multichannel/registrar.go","lineNumber":1016,"sourceCode":"\tif payload.Header == nil {\n\t\treturn \"\", errors.New(\"missing channel header\")\n\t}\n\n\tchdr, err := protoutil.UnmarshalChannelHeader(payload.Header.ChannelHeader)\n\tif err != nil {\n\t\treturn \"\", errors.WithMessage(err, \"error unmarshalling channel header\")\n\t}\n\n\treturn chdr.ChannelId, nil\n}\n\nfunc (r *Registrar) ApplyFilters(channel string, env *cb.Envelope) error {\n\tr.lock.RLock()\n\tcs, exists := r.chains[channel]\n\tr.lock.RUnlock()\n\n\tif !exists {\n\t\treturn errors.Errorf(\"channel %s doesn't exist\", channel)\n\t}\n\n\treturn msgprocessor.CreateStandardChannelFilters(cs, r.config).Apply(env)\n}\n\nfunc (r *Registrar) ProposeConfigUpdate(channel string, configtx *cb.Envelope) (*cb.ConfigEnvelope, error) {\n\tr.lock.RLock()\n\tcs, exists := r.chains[channel]\n\tr.lock.RUnlock()\n\n\tif !exists {\n\t\treturn nil, errors.Errorf(\"channel %s doesn't exist\", channel)\n\t}\n\n\treturn cs.ProposeConfigUpdate(configtx)\n}\n","sourceCodeStart":998,"sourceCodeEnd":1033,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/common/multichannel/registrar.go#L998-L1033","documentation":"ApplyFilters looks up the channel's chain support in the registrar's chain map before applying standard message filters. If the named channel is not managed by this orderer, it rejects the envelope with this error. It is the Broadcast-path guard ensuring only channels the orderer participates in accept transactions.","triggerScenarios":"Broadcasting a transaction envelope to a channel the orderer has not joined (no entry in r.chains) — wrong channel name in the envelope's channel header, or the orderer joined via channel participation but the client targets a different channel.","commonSituations":"Typo in the channel name in the SDK submit call; peer on channel X while orderer only on channel Y; orderer restarted without re-joining channels when using osnadmin participation (no system channel to auto-load them).","solutions":["Confirm the channel name in the client matches a channel the orderer has joined (osnadmin channel list)","Join the orderer to the channel with osnadmin channel join and the channel's genesis block","Check for typos/case mismatches in the ChannelId used to build the envelope"],"exampleFix":"// before: submit to possibly wrong channel\nenv, _ := protoutil.CreateSignedEnvelope(common.HeaderType_ENDORSER_TRANSACTION, \"mychanel\", ...)\n\n// after: read the channel name from config, validate first\nchannel := viper.GetString(\"channel\")\nif channel != \"mychannel\" { return fmt.Errorf(\"unknown channel %q\", channel) }\nenv, _ := protoutil.CreateSignedEnvelope(common.HeaderType_ENDORSER_TRANSACTION, channel, ...)","handlingStrategy":"validation","validationCode":"// client: confirm orderer membership before broadcast\nresp, _ := osnadmin.ListChannels(ordererURL)\nif !contains(resp.Channels, channelID) {\n    return fmt.Errorf(\"orderer not joined to channel %s\", channelID)\n}","typeGuard":"func ordererServesModule(channels []types.ChannelInfo, name string) bool {\n    for _, c := range channels {\n        if c.Name == name { return true }\n    }\n    return false\n}","tryCatchPattern":"err := broadcast(env)\nif err != nil {\n    if strings.Contains(err.Error(), \"doesn't exist\") {\n        // join orderer to the channel, then retry once\n        _ = osnadmin.Join(ordererURL, channelID, genesisBlockPath)\n        return broadcast(env)\n    }\n    return err\n}","preventionTips":["Centralize channel names in shared config instead of hardcoding literals","After orderer restarts, script osnadmin channel list/join to restore channel membership","Match peer and orderer channel sets during environment provisioning"],"tags":["hyperledger-fabric","orderer","broadcast","channel-not-found"],"backgroundTag":"channel-not-found","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"}