fabric-go-sdk使用中的若干问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/scylhy/article/details/85179171

fabric-go-sdk使用中的若干问题–连接e2e网络

  • problem
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
 [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 中的无用组织的内容,改问题消失
    

猜你喜欢

转载自blog.csdn.net/scylhy/article/details/85179171