我设置了一个多主机,多组织HyperLeDger Fabric。每个组织上有1个独奏订单和2个对等方。
我使用的是织物1.3和作曲家0.20.5。我的网络直接与二进制文件直接运行,我不使用Docker。
织物网络正常工作,日志上没有错误。测试了一个简单的链代码,并在所有同行中都调用和查询。
我安装了一个BNA并开始工作,现在我试图升级一个几乎没有更改的一个,因此我继续进行:
composer archive create --sourceType dir --sourceName ../
composer network install -c PeerAdmin@hlfv1 -a myBNA.bna
composer network upgrade -c PeerAdmin@hlfv1 -n myBNA -V 0.2.13
它已成功安装,但是升级时我会收到此错误:
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error uploading input to container: API error (404): Could not find the file /chaincode/input in container 499d9b418f106ac1065fa18117b5a39dea1f623ff132cefe59b91d042deabced
Command failed
如果我在作曲家播放地上修改了文件,然后单击"部署更改",我会遇到相同的错误。
所以我认为我会重新启动网络并直接启动更新的版本:
composer network start -n myBNA -V 0.2.13 -A admin -S adminpw -c eb-PeerAdmin@hlfv1 -f admin.card
并有相同的错误。
如果我继续安装并使用以前的版本来启动网络,但无法升级。
这不是连接问题,因为我可以ping节点并成功完成安装。
从peeer登录:
^[[34m2018-12-17 18:59:50.129 UTC [lscc] executeInstall -> INFO 054^[[0m Installed Chaincode [myBNA] Version [0.2.13] to peer
^[[34m2018-12-17 18:59:50.129 UTC [endorser] callChaincode -> INFO 055^[[0m [][01b5adf7] Exit chaincode: name:"lscc" (1ms)
^[[34m2018-12-17 18:59:50.456 UTC [endorser] callChaincode -> INFO 056^[[0m [mychannel][bc98ca67] Entry chaincode: name:"cscc"
^[[34m2018-12-17 18:59:50.456 UTC [endorser] callChaincode -> INFO 057^[[0m [mychannel][bc98ca67] Exit chaincode: name:"cscc" (0ms)
^[[34m2018-12-17 18:59:50.610 UTC [endorser] callChaincode -> INFO 058^[[0m [mychannel][795d5d2f] Entry chaincode: name:"lscc"
^[[31m2018-12-17 18:59:50.750 UTC [chaincode-platform] func1 -> ERRO 059^[[0m Failed to generate platform-specific docker build: Error uploading input to container: API error (404): Could not find the file /chaincode/input in container f$
^[[31m2018-12-17 18:59:50.750 UTC [dockercontroller] deployImage -> ERRO 05a^[[0m Error building images: Failed to generate platform-specific docker build: Error uploading input to container: API error (404): Could not find the file /cha$
^[[31m2018-12-17 18:59:50.750 UTC [dockercontroller] deployImage -> ERRO 05b^[[0m Image Output:
********************
********************
^[[34m2018-12-17 18:59:50.752 UTC [endorser] callChaincode -> INFO 05c^[[0m [mychannel][795d5d2f] Exit chaincode: name:"lscc" (142ms)
^[[31m2018-12-17 18:59:50.752 UTC [endorser] SimulateProposal -> ERRO 05d^[[0m [mychannel][795d5d2f] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error uploading input to cont$
error starting container
error starting container
^[[34m2018-12-17 19:00:02.220 UTC [endorser] callChaincode -> INFO 05e^[[0m [mychannel][b7a11129] Entry chaincode: name:"myBNA"
^[[34m2018-12-17 19:00:02.229 UTC [endorser] callChaincode -> INFO 05f^[[0m [mychannel][b7a11129] Exit chaincode: name:"myBNA" (9ms)
尽管我没有使用docker来运行节点,但我的问题是假设我根本没有使用docker。我相信链码安装在Docker容器中,并且由于我没有进行适当的清洁,这就是为什么发生奇怪的事情。
我的解决方案是执行docker system prune -a -f
以删除未使用的数据。
之后,我可以启动和升级我的BNA,甚至可以从作曲家游戏中部署更改。