我正尝试通过以下方式启动网络:
composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
但随后出现此错误:
Processing these Network Admins:
userName: admin
⠋ Starting business network definition. This may take a minute...
✖ Starting business network definition. This may take a minute...
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: cannot get package for chaincode (tutorial-network:0.0.1)
Command failed
我已经找到了解决方案。只是在这里分享给遇到相同问题的人
答案 0 :(得分:0)
该问题的解决方案是:
1)composer network install --card PeerAdmin@hlfv1 --archiveFile tutorial-network@0.0.1.bna
2)composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
3)composer card import --file networkadmin.card
4)composer network ping --card admin@tutorial-network