{"record":{"id":"0c34e6a102d3f57b","repo":"hyperledger/fabric","slug":"could-not-get-connection-info","errorCode":null,"errorMessage":"could not get connection info","messagePattern":"could not get connection info","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/chaincode/runtime_launcher.go","lineNumber":107,"sourceCode":"\t\t\tif ccservinfo != nil {\n\t\t\t\tif err = r.ConnectionHandler.Stream(ccid, ccservinfo, streamHandler); err != nil {\n\t\t\t\t\tstartFailCh <- errors.WithMessagef(err, \"connection to %s failed\", ccid)\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tlaunchState.Notify(errors.Errorf(\"connection to %s terminated\", ccid))\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// default peer-as-server model... compute connection information for CC callback\n\t\t\t// and proceed to launch chaincode\n\t\t\tccinfo, err := r.ChaincodeClientInfo(ccid)\n\t\t\tif err != nil {\n\t\t\t\tstartFailCh <- errors.WithMessage(err, \"could not get connection info\")\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif ccinfo == nil {\n\t\t\t\tstartFailCh <- errors.New(\"could not get connection info\")\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif err = r.Runtime.Start(ccid, ccinfo); err != nil {\n\t\t\t\tstartFailCh <- errors.WithMessage(err, \"error starting container\")\n\t\t\t\treturn\n\t\t\t}\n\t\t\texitCode, err := r.Runtime.Wait(ccid)\n\t\t\tif err != nil {\n\t\t\t\tlaunchState.Notify(errors.Wrap(err, \"failed to wait on container exit\"))\n\t\t\t}\n\t\t\tlaunchState.Notify(errors.Errorf(\"container exited with %d\", exitCode))\n\t\t}()\n\t}\n\n\tvar err error\n\tselect {\n\tcase <-launchState.Done():\n\t\terr = errors.WithMessage(launchState.Err(), \"chaincode registration failed\")","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/chaincode/runtime_launcher.go#L89-L125","documentation":"The launcher could not build ChaincodeClientInfo (connection details such as package ID, address, TLS root certs) for the chaincode. In the peer-as-server default model this info is required to start the container, so launch aborts immediately.","triggerScenarios":"r.ChaincodeClientInfo(ccid) returns an error, or returns nil info, during Launch() of a chaincode under the default peer-as-server model.","commonSituations":"Chaincode package not installed/committed so the peer has no package metadata for the package ID; corrupted installed chaincode package store; lifecycle (LSCC/_lifecycle) metadata missing or mismatched after upgrade.","solutions":["Check that the chaincode package is installed: peer lifecycle chaincode queryinstalled","Re-install/re-commit the chaincode package if missing or corrupted","Inspect the peer's chaincode package store on disk and peer logs for the underlying error","Restart the peer to reload chaincode package metadata"],"exampleFix":"// before: launching uninstalled package\npeer chaincode invoke -C mychannel -n mycc ...  // -> could not get connection info\n// after\npeer lifecycle chaincode install mycc.tar.gz\npeer lifecycle chaincode approveformyorg ...\npeer chaincode invoke -C mychannel -n mycc ...","handlingStrategy":"validation","validationCode":"pkgs, _ := Stub{}.QueryInstalled() // client-side equivalent:\n// run: peer lifecycle chaincode queryinstalled | grep <packageID>\n// only invoke after the package is installed and committed on the channel","typeGuard":"func hasConnectionInfo(info *ChaincodeClientInfo) bool { return info != nil && info.PackageID != \"\" }","tryCatchPattern":"if err := launcher.Launch(ccid); err != nil && strings.Contains(err.Error(), \"could not get connection info\") {\n    // re-run: peer lifecycle chaincode install ...\n}","preventionTips":["Always run peer lifecycle chaincode queryinstalled before invoking","Commit chaincode definitions on every endorsing org before use","Verify package store integrity after peer upgrades","Backup/restore the peer's chaincode package directory together with the ledger"],"tags":["chaincode","lifecycle","configuration"],"backgroundTag":"chaincode-not-installed","analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}