无法启动或升级BNA

时间:2018-12-17 19:35:31

标签: hyperledger-fabric hyperledger hyperledger-composer

我设置了多主机,多组织的Hyperledger Fabric。每个单位1个单独订购者和2个对等实体。

我正在使用Fabric 1.3和Composer 0.20.5。我的网络直接通过二进制文件运行,我没有使用docker。

Fabric网络运行正常,日志上没有错误。测试了一个简单的链码,并在所有对等节点上调用和查询。

我已经安装了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-playground上修改文件并单击“部署更改”,则会出现相同的错误。

所以我想我将重新启动网络并直接启动更新的版本:

composer network start -n myBNA -V 0.2.13 -A admin -S adminpw -c eb-PeerAdmin@hlfv1 -f admin.card

并遇到相同的错误。

如果我继续安装并使用以前的版本启动网络,则可以使用...但无法升级。

这不是连接问题,因为我可以ping节点并且安装成功完成。

撒尿者的日志:

^[[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)

1 个答案:

答案 0 :(得分:0)

尽管我没有使用docker运行节点,但我的问题是假设我根本没有使用docker。我相信chaincode会安装在Docker容器中,并且由于我没有进行适当的清理,所以这就是奇怪的事情发生的原因。

我的解决方案是执行docker system prune -a -f删除未使用的数据。

之后,我可以开始并升级我的BNA,甚至可以从composer-playground部署更改。