将区块链资源管理器(https://github.com/hyperledger/blockchain-explorer)连接到Composer频道。大部分都是好的,我可以浏览并调用API用于块和事务,但查询已安装的链代码失败。堆栈在下面。这里有什么建议?非常感谢!
=====
Please open Internet explorer to access :http://localhost:4000/
[2017-11-19 10:50:07.735] [INFO] Helper - Successfully loaded member from persistence
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Authorization for GETINSTALLEDCHAINCODES on channel getinstalledchaincodes has been denied with error Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin])
at /Users/andrei/Development/Zest/Blockchain/blockchain-explorer/node_modules/grpc/src/client.js:554:15
error: [Client.js]: Failed Installed Chaincodes Query. Error: Error: chaincode error (status: 500, message: Authorization for GETINSTALLEDCHAINCODES on channel getinstalledchaincodes has been denied with error Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin])
at /Users/andrei/Development/Zest/Blockchain/blockchain-explorer/node_modules/grpc/src/client.js:554:15
[2017-11-19 10:50:07.764] [ERROR] Query - Error: chaincode error (status: 500, message: Authorization for GETINSTALLEDCHAINCODES on channel getinstalledchaincodes has been denied with error Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin])
at /Users/andrei/Development/Zest/Blockchain/blockchain-explorer/node_modules/grpc/src/client.js:554:15
[2017-11-19 10:50:08.784] [ERROR] Query - TypeError: Cannot read property 'toArray' of null
at EC.sign (/Users/andrei/Development/Zest/Blockchain/blockchain-explorer/node_modules/elliptic/lib/elliptic/ec/index.js:102:30)
at CryptoSuite_ECDSA_AES.sign (/Users/andrei/Development/Zest/Blockchain/blockchain-explorer/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:267:25)
at Signer.sign (/Users/andrei/Development/Zest/Blockchain/blockchain-explorer/node_modules/fabric-client/lib/msp/identity.js:167:28)
at SigningIdentity.sign (/Users/andrei/Development/Zest/Blockchain/blockchain-explorer/node_modules/fabric-client/lib/msp/identity.js:218:23)
at Object.module.exports.signProposal (/Users/andrei/Development/Zest/Blockchain/blockchain-explorer/node_modules/fabric-client/lib/client-utils.js:116:28)
at Function.sendTransactionProposal (/Users/andrei/Development/Zest/Blockchain/blockchain-explorer/node_modules/fabric-client/lib/Channel.js:1367:37)
at Client.queryInstalledChaincodes (/Users/andrei/Development/Zest/Blockchain/blockchain-explorer/node_modules/fabric-client/lib/Client.js:590:18)
at helper.getOrgAdmin.then (/Users/andrei/Development/Zest/Blockchain/blockchain-explorer/app/query.js:118:18)
at <anonymous>
答案 0 :(得分:0)
我怀疑此Fabric错误是Fabric CA服务器(容器)无法识别您正在使用的管理员:您是否重新启动了CA服务器。
如果安装在Linux或Mac上(Hyperledger Composer目前还不支持Windows) - 您可以使用本地Fabric Blockchain Explorer设置来查询安装的Composer业务网络,如下所示:
例如(频道名称为composerchannel
):
curl -X GET "http://localhost:8080/apis/chaincodes?channel=composerchannel" -H "accept:application/json"
将返回该频道上安装的当前作曲家业务网络列表。
或部署的链代码列表:
curl -X POST http://localhost:8080/chaincodelist -H 'cache-control: no-cache' -H 'content-type: application/json' -d ''