sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [mychannel] creato

最运行node sdk时,出现了以下错误:

[root@slave3 node-sdk]# node test.js 
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [CoreOrg1MSP]
    at new createStatusError (/opt/gopath/src/github.com/hyperledger/fabric/scf/node-sdk/node_modules/fabric-client/node_modules/grpc/src/client.js:64:15)
    at /opt/gopath/src/github.com/hyperledger/fabric/scf/node-sdk/node_modules/fabric-client/node_modules/grpc/src/client.js:583:15
error: [Channel.js]: Failed Query channel info. Error: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [CoreOrg1MSP]
    at new createStatusError (/opt/gopath/src/github.com/hyperledger/fabric/scf/node-sdk/node_modules/fabric-client/node_modules/grpc/src/client.js:64:15)
    at /opt/gopath/src/github.com/hyperledger/fabric/scf/node-sdk/node_modules/fabric-client/node_modules/grpc/src/client.js:583:15
(node:12726) UnhandledPromiseRejectionWarning: Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [CoreOrg1MSP]
    at new createStatusError (/opt/gopath/src/github.com/hyperledger/fabric/scf/node-sdk/node_modules/fabric-client/node_modules/grpc/src/client.js:64:15)
    at /opt/gopath/src/github.com/hyperledger/fabric/scf/node-sdk/node_modules/fabric-client/node_modules/grpc/src/client.js:583:15
(node:12726) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:12726) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

导致这个错误的原因有很多。比如用户没有权限,通道配置文件填写错误等等。我这里是因为使用的是普通user用户的身份信息来操作fabric系统,但是普通的user用户没有权限(具体什么权限不太清楚)。所以将keystore和signcerts改成Admin的即可解决。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值