{"record":{"id":"5b3eeeb6ab393b30","repo":"hyperledger/fabric","slug":"timeout-waiting-for-channel-creation","errorCode":null,"errorMessage":"timeout waiting for channel creation","messagePattern":"timeout waiting for channel creation","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/channel/create.go","lineNumber":212,"sourceCode":"\t}\n\terr = os.WriteFile(file, b, 0o644)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n// deprecated\nfunc getGenesisBlock(cf *ChannelCmdFactory) (*cb.Block, error) {\n\ttimer := time.NewTimer(timeout)\n\tdefer timer.Stop()\n\n\tfor {\n\t\tselect {\n\t\tcase <-timer.C:\n\t\t\tcf.DeliverClient.Close()\n\t\t\treturn nil, errors.New(\"timeout waiting for channel creation\")\n\t\tdefault:\n\t\t\tif block, err := cf.DeliverClient.GetSpecifiedBlock(0); err != nil {\n\t\t\t\tcf.DeliverClient.Close()\n\t\t\t\tcf, err = InitCmdFactory(EndorserNotRequired, PeerDeliverNotRequired, OrdererRequired)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, errors.WithMessage(err, \"failed connecting\")\n\t\t\t\t}\n\t\t\t\ttime.Sleep(200 * time.Millisecond)\n\t\t\t} else {\n\t\t\t\tcf.DeliverClient.Close()\n\t\t\t\treturn block, nil\n\t\t\t}\n\t\t}\n\t}\n}\n\n// deprecated\nfunc create(cmd *cobra.Command, args []string, cf *ChannelCmdFactory) error {","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/channel/create.go#L194-L230","documentation":"getGenesisBlock polls the orderer's deliver service for block 0 (the channel genesis block) after submitting a create transaction. If the genesis block is not delivered within the configured timeout (default ~10s via --timeout), it gives up and reports 'timeout waiting for channel creation', since without block 0 creation cannot be confirmed.","triggerScenarios":"Running `peer channel create` where the orderer never returns block 0 within the timeout: slow consensus, orderer not actually started, TLS/cert mismatch preventing deliver, or very slow HSM signing.","commonSituations":"Orderer container still bootstrapping;RAFT leader election delay in a multi-node ordering service; wrong orderer TLS CA in the peer config; network latency between peer and orderer; GENESIS block retrieval behind a proxy that drops idle streams.","solutions":["Re-run with a longer timeout: --timeout 30s (or higher).","Verify the orderer is running and reachable (logs, `docker ps`, port connectivity).","Check orderer logs for the channel creation/consensus errors; fix TLS certs or genesis profile issues.","Retry the create after the cluster settles — the channel may actually exist, so check with `peer channel list` first."],"exampleFix":"// before\npeer channel create -o orderer:7050 -c mychannel -f mychannel.tx\n// after\npeer channel create -o orderer:7050 -c mychannel -f mychannel.tx --timeout 60s","handlingStrategy":"retry","validationCode":"nc -z orderer.example.com 7050 || { echo \"orderer unreachable\" >&2; exit 1; }\npeer channel create ... --timeout 60s","typeGuard":null,"tryCatchPattern":"err := cmd.Execute()\nif err != nil && strings.Contains(err.Error(), \"timeout waiting for channel creation\") {\n    // check `peer channel list`, then retry with larger --timeout\n}","preventionTips":["Set a generous --timeout in scripts and CI.","Ensure orderers are healthy and RAFT leader elected before creating channels.","Verify TLS CA configuration for the orderer connection.","After a timeout, check whether the channel actually exists before retrying."],"tags":["network","timeout","fabric","orderer"],"backgroundTag":"operation-timed-out","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"}