fabric-go-sdk使用中的若干问题--连接e2e网络
【摘要】 ### fabric-go-sdk使用中的若干问题--连接e2e网络- problem```bashlocalhost:heroes-service liu$ go run main.go SDK createdRessource management client createdChannel createdChannel joinedInitialization Successfulcc...
### fabric-go-sdk使用中的若干问题--连接e2e网络
- problem
```bash
localhost:heroes-service liu$ go run main.go
SDK created
Ressource management client created
Channel created
Channel joined
Initialization Successful
ccPkg created
Chaincode installed
Unable to install and instantiate the chaincode: failed to instantiate the chaincode: failed to get discovery service: could not get chConfig cache reference: load config items from config group failed: unsupported MSP type (1)
```
- debug
```bash
[fabsdk/fab] 2018/12/21 15:25:25 UTC - comm.(*CachingConnector).ensureJanitorStarted -> DEBU janitor already started
[fabsdk/fab] 2018/12/21 15:25:25 UTC - chconfig.loadConfig -> DEBU loadConfigGroup - - found config group ==> Orderer
[fabsdk/fab] 2018/12/21 15:25:25 UTC - chconfig.loadConfig -> DEBU loadConfigGroup - Orderer - found config group ==> OrdererOrg
[fabsdk/fab] 2018/12/21 15:25:25 UTC - chconfig.loadConfig -> DEBU loadConfigGroup - - found config group ==> Application
[fabsdk/fab] 2018/12/21 15:25:25 UTC - chconfig.loadConfig -> DEBU loadConfigGroup - Application - found config group ==> Org1MSP
[fabsdk/fab] 2018/12/21 15:25:25 UTC - chconfig.loadConfig -> DEBU loadConfigGroup - Application - found config group ==> Org2MSP
[fabsdk/fab] 2018/12/21 15:25:25 UTC - chconfig.loadConfig -> DEBU loadConfigGroup - Application - found config group ==> Org3MSP
[fabsdk/util] 2018/12/21 15:25:25 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: load config items from config group failed: unsupported MSP type (1). Will retry again later
[fabsdk/util] 2018/12/21 15:25:25 UTC - lazyref.checkTimeStarted -> DEBU ... finished handling expiration. Setting expiration to 1m30s
[fabsdk/util] 2018/12/21 15:25:25 UTC - lazyref.checkTimeStarted -> DEBU Got closed event. Exiting timer.
```
- 解决办法
这里因为demo,只用到了org1,并且只配置了org1,但是e2e 网络中存在org1 org2 org3,及缺少了org2、org3的配置,变出错了;
解决:清理,configtx.yaml 和crypto-config.yaml 中的无用组织的内容,改问题消失
### fabric-go-sdk使用中的若干问题--连接e2e网络
- problem
```bash
localhost:heroes-service liu$ go run main.go
SDK created
Ressource management client created
Channel created
Channel joined
Initialization Successful
ccPkg created
Chaincode installed
Unable to install and instantiate the chaincode: failed to instantiate the chaincode: failed to get discovery service: could not get chConfig cache reference: load config items from config group failed: unsupported MSP type (1)
```
- debug
```bash
[fabsdk/fab] 2018/12/21 15:25:25 UTC - comm.(*CachingConnector).ensureJanitorStarted -> DEBU janitor already started
[fabsdk/fab] 2018/12/21 15:25:25 UTC - chconfig.loadConfig -> DEBU loadConfigGroup - - found config group ==> Orderer
[fabsdk/fab] 2018/12/21 15:25:25 UTC - chconfig.loadConfig -> DEBU loadConfigGroup - Orderer - found config group ==> OrdererOrg
[fabsdk/fab] 2018/12/21 15:25:25 UTC - chconfig.loadConfig -> DEBU loadConfigGroup - - found config group ==> Application
[fabsdk/fab] 2018/12/21 15:25:25 UTC - chconfig.loadConfig -> DEBU loadConfigGroup - Application - found config group ==> Org1MSP
[fabsdk/fab] 2018/12/21 15:25:25 UTC - chconfig.loadConfig -> DEBU loadConfigGroup - Application - found config group ==> Org2MSP
[fabsdk/fab] 2018/12/21 15:25:25 UTC - chconfig.loadConfig -> DEBU loadConfigGroup - Application - found config group ==> Org3MSP
[fabsdk/util] 2018/12/21 15:25:25 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: load config items from config group failed: unsupported MSP type (1). Will retry again later
[fabsdk/util] 2018/12/21 15:25:25 UTC - lazyref.checkTimeStarted -> DEBU ... finished handling expiration. Setting expiration to 1m30s
[fabsdk/util] 2018/12/21 15:25:25 UTC - lazyref.checkTimeStarted -> DEBU Got closed event. Exiting timer.
```
- 解决办法
这里因为demo,只用到了org1,并且只配置了org1,但是e2e 网络中存在org1 org2 org3,及缺少了org2、org3的配置,变出错了;
解决:清理,configtx.yaml 和crypto-config.yaml 中的无用组织的内容,改问题消失
【声明】本内容来自华为云开发者社区博主,不代表华为云及华为云开发者社区的观点和立场。转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息,否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)