我已经设置了Multi-Org(4 org)Fabric。每个组织都有一个同位体(peer0)。在第二组织进行查询时,出现以下错误:
Calling One getOrdersByEBSDashboardStatus Function..
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [ebsMSP]
at new createStatusError (/home/vikas123/fabric-samples/kpn_grpc/node_modules/fabric-client/node_modules/grpc/src/client.js:64:15)
at /home/vikas123/fabric-samples/kpn_grpc/node_modules/fabric-client/node_modules/grpc/src/client.js:583:15
Query has completed, checking results
error from query = { Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [ebsMSP]
at new createStatusError (/home/vikas123/fabric-samples/kpn_grpc/node_modules/fabric-client/node_modules/grpc/src/client.js:64:15)
at /home/vikas123/fabric-samples/kpn_grpc/node_modules/fabric-client/node_modules/grpc/src/client.js:583:15
code: 2,
metadata: Metadata { _internal_repr: {} },
details: 'access denied: channel [mychannel] creator org [ebsMSP]' }
与此同时,当我检查与该组织有关的docker日志时,我看到消息:通道[mychannel]:MSP错误:通道不存在。
请检查附加的查询文件:https://github.com/SakivV/dockergit/blob/master/queryebs.js
答案 0 :(得分:0)
请记住,一旦生成了加密材料,就必须自动创建通道,并且不再需要创建通道,但是必须一个一个地加入所有对等方,然后更新与该加入有关的通道。
peer channel fetch 0 $CHANNEL_NAME.block -c $CHANNEL_NAME -o orderer.example.com:7050
peer channel join -b $CHANNEL_NAME.block -c $CHANNEL_NAME -o orderer.example.com:7050
在channel-artifacts /(Org1Panchors.tx)中有锚点对等体
peer channel update -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/Org1Panchors.tx