简体   繁体   English

什么是peer name 如果我们添加两个成员| 亚马逊托管区块链| 休息服务器

[英]What is the peer name If we add two members | amazon managed blockchain | REST Server

I set up hyperledger fabric network in amazon managed blockchain using this document .我使用本文档在亚马逊管理的区块链中设置了超级账本结构网络。 I have used this as rest server.我已将用作休息服务器。 I have configured peer name as peer1 here .在这里配置了 peer name 为 peer1 。 It was worked properly.它工作正常。 Later I added one more member using this document .后来我使用这个文档又添加了一个成员。 Now member 1 and member 2 should endorse the transaction.现在成员 1 和成员 2 应该为交易背书。

docker exec cli peer chaincode instantiate -o $ORDERER \ 
-C ourchannel -n myjointcc -v v0 \
-c '{"Args":["init","a","100","b","200"]}' \
--cafile /opt/home/managedblockchain-tls-chain.pem --tls \
-P "AND ('Member1ID.member','Member2ID.member')"

Now I edited this config file as "peers":["peer1", "peer2"] .现在我将此配置文件编辑为"peers":["peer1", "peer2"] But I am getting the following error,但我收到以下错误,

[2020-09-02 05:54:20.915] [ERROR] invoke-chaincode - Error: Peer with name "peer2" not assigned to this channel
    at Channel._getTargets (/var/www/html/network/node_modules/fabric-client/lib/Channel.js:3515:13)
    at Channel.sendTransactionProposal (/var/www/html/network/node_modules/fabric-client/lib/Channel.js:2791:26)
    at Object.invokeChaincode (/var/www/html/network/app/invoke-transaction.js:41:31)
    at <anonymous>
[2020-09-02 05:54:20.915] [ERROR] invoke-chaincode - Failed to invoke chaincode. cause:Error: Peer with name "peer2" not assigned to this channel

What should I used instead of peer2?我应该用什么来代替 peer2? Help me to fix this issue.帮我解决这个问题。

you may have missed the step of joinning the peer to the channel:您可能错过了将peer加入频道的步骤:

docker exec cli peer channel join -b /opt/home/ourchannel.block \
-o $ORDERER --cafile /opt/home/managedblockchain-tls-chain.pem --tls

Both org1 and org2 need to run the following command on their respective Hyperledger Fabric clients to join their peer nodes to the channel org1 和 org2 都需要在各自的 Hyperledger Fabric 客户端上运行以下命令以将其对等节点加入通道

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Amazon Managed Blockchain Hyperledger Fabric 1.2上以REST API部署和公开Chaincode - Deploy and expose chaincode as REST api on amazon managed blockchain hyperledger fabric 1.2 无法在 Hyperledger Fabric 上调用 nodejs 链代码 - Amazon Managed Blockchain - Can't invoke nodejs chaincode on Hyperledger Fabric - Amazon Managed Blockchain 在NodeJS区块链中,此代码是否创建一个基本的对等区块链来检查前一个区块的哈希值? - In a NodeJS Blockchain, does this code create a basic peer to peer blockchain that checks the previous block's hash? 寻找一个端到端教程,以使用Hyperledger Fabric和Composer REST SERVER开发NodeJs区块链应用程序 - Looking for a End-to-End tutorial to develop a NodeJs Blockchain Appliation using Hyperledger Fabric and Composer REST SERVER WebRTC 对等服务器连接 - WebRTC Peer to Server Connection 如何在节点js的区块链中添加区块? - How to add a block in blockchain in node js? 究竟什么是对等依赖项和插件 - What exactly are peer dependencies and plugins 亚马逊MWS有REST版API吗? - Amazon MWS is there REST version API? 有没有办法比较两个成员的排名? - Is there a way to compare two members' rankings? Discord rest API:从公会中踢出成员 - Discord rest API: Kick members from guild
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM