{"record":{"id":"9f1abd9a76796793","repo":"hyperledger/fabric","slug":"could-not-connect-to-ordering-service-orderer-add","errorCode":null,"errorMessage":"could not connect to ordering service, orderer-address: %s","messagePattern":"could not connect to ordering service, orderer-address: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/deliverclient/blocksprovider/bft_deliverer.go","lineNumber":351,"sourceCode":"\tfor {\n\t\tselect {\n\t\tcase <-d.DoneC:\n\t\t\tfetchErrorsC <- &ErrStopping{Message: \"stopping\"}\n\t\t\treturn\n\t\tdefault:\n\t\t}\n\n\t\tseekInfoEnv, err := d.requester.SeekInfoBlocksFrom(d.getNextBlockNumber())\n\t\tif err != nil {\n\t\t\td.Logger.Errorf(\"Could not create a signed Deliver SeekInfo message, something is critically wrong: %s\", err)\n\t\t\tfetchErrorsC <- &ErrFatal{Message: fmt.Sprintf(\"could not create a signed Deliver SeekInfo message: %s\", err)}\n\t\t\treturn\n\t\t}\n\n\t\tdeliverClient, cancel, err := d.requester.Connect(seekInfoEnv, source)\n\t\tif err != nil {\n\t\t\td.Logger.Warningf(\"Could not connect to ordering service: %s\", err)\n\t\t\tfetchErrorsC <- errors.Wrapf(err, \"could not connect to ordering service, orderer-address: %s\", source.Address)\n\t\t\treturn\n\t\t}\n\n\t\tblockRcv := &BlockReceiver{\n\t\t\tchannelID:              d.ChannelID,\n\t\t\tblockHandler:           d.BlockHandler,\n\t\t\tupdatableBlockVerifier: d.UpdatableBlockVerifier,\n\t\t\tdeliverClient:          deliverClient,\n\t\t\tcancelSendFunc:         cancel,\n\t\t\trecvC:                  make(chan *orderer.DeliverResponse),\n\t\t\tstopC:                  make(chan struct{}),\n\t\t\tendpoint:               source,\n\t\t\tlogger:                 flogging.MustGetLogger(\"BlockReceiver\").With(\"orderer-address\", source.Address),\n\t\t}\n\n\t\td.mutex.Lock()\n\t\tif d.blockReceiver != nil {\n\t\t\td.blockReceiver.Stop()","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/common/deliverclient/blocksprovider/bft_deliverer.go#L333-L369","documentation":"FetchBlocks attempts d.requester.Connect(seekInfoEnv, source) to open a deliver stream to one orderer endpoint; on failure it logs a warning and pushes an error wrapping the cause with the orderer address into fetchErrorsC. DeliverBlocks aggregates these, so block fetching for that source fails. Unlike error 215, this is a per-fetch-source failure that is reported through a channel rather than aborting setup.","triggerScenarios":"During DeliverBlocks -> FetchBlocks for a specific source, Connect fails (dial error, TLS failure, orderer down); the error is wrapped as \"could not connect to ordering service, orderer-address: <source.Address>\" and sent to fetchErrorsC.","commonSituations":"An individual orderer in the endpoint list is offline; endpoint address stale after config refresh; TLS cert rotation mismatch; network partition between peer and one orderer while others work.","solutions":["Check the specific orderer-address shown in the error is running and reachable (ping/nc the host:port).","Refresh endpoints: ensure the peer has up-to-date orderer addresses (endpoint refresh / channel config).","Verify TLS material for that orderer matches (CA certs, SANs); reissue or update crypto config if rotated.","Let the block fetcher retry against other orderers; if all fail, fix shared network/DNS issues."],"exampleFix":"// before: stale orderer address in channel config\n// orderer-address: orderer.example.com:7050 (host decommissioned)\n// after: update channel config to live orderer\n// orderer-address: orderer1.example.com:7050\npeer channel update -f updated_orderer_config.pb -c mychannel","handlingStrategy":"retry","validationCode":"// validate the endpoint before FetchBlocks attempts Connect\nif err := checkOrdererReachable(source.Address); err != nil {\n    log.Warnf(\"skipping source %s: %v\", source.Address, err)\n    return\n}","typeGuard":null,"tryCatchPattern":"for err := range fetchErrorsC {\n    var wrapped interface{ Unwrap() error } = err\n    if strings.Contains(err.Error(), \"could not connect to ordering service\") {\n        log.Warnf(\"orderer %s connect failed, rotating endpoint: %v\", extractAddress(err), err)\n        continue // DeliverBlocks retries other sources\n    }\n    return err\n}","preventionTips":["Maintain a diverse orderer endpoint list so one bad endpoint does not block fetching.","Refresh endpoints when channel config changes (endpoint refresh mechanism).","Align TLS cert lifetimes and SANs across all orderers.","Alert on orderer health so dead endpoints are replaced quickly."],"tags":["network","connection","ordering-service","fabric"],"backgroundTag":"ordering-service-connection-failed","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"}