问题描述
我正在尝试升级Hyperledger Fabric业务网络,但出现此错误
I am trying to upgrade hyperledger fabric business network and I get this error
composer archive create -t dir -n . && \
composer network install -a $BNA_FILE -c PeerAdmin@hlfv1 && \
composer network upgrade -c PeerAdmin@hlfv1 -n NETWORK-NAME -V 0.1.23
版本号对应于package.json
中的版本号,如文档所述.运行升级命令时出现以下错误
The version number corresponds to that one in the package.json
like the documentation says it should. I get the below error when I run the upgrade command
Error: Error trying to upgrade business network. Error: No valid responses
from any peers.
Response from attempted peer comms was an error: Error: 2 UNKNOWN: chaincode
error (status: 500, message: could not find chaincode with name 'NETWORK-NAME')
我确保超级账本结构正在运行./startFabric
,但仍然出现此错误
I made sure that hyperledger fabric is running ./startFabric
yet I still get this error
推荐答案
收到的错误消息是说没有名为NETWORK-NAME
的业务网络已启动.为了升级业务网络,必须先启动它.
The error message received is saying that there is no business network called NETWORK-NAME
started. In order to upgrade a business network it has to have been previously started.
在这种情况下,听起来像是已经启动了composer提供的简单结构开发服务器,并且最初已安装并启动了业务网络NETWORK-NAME
.在某个时候,您已经重新启动了光纤网络,但是这种重启实际上已经删除了现有的光纤网络服务器,并创建了一个新的全新光纤网络.由于这是一个干净的结构网络,因此通道上现在没有业务网络,您需要从头开始重新安装并安装并启动业务网络.例如,startFabric.sh
脚本实际上完全删除了您现有的光纤网络,并创建了一个新的光纤网络,因此业务网络和数据都丢失了.
What it sounds like in this case is that you have started the simple fabric development server provided by composer and initially installed and started the business network NETWORK-NAME
. At some point you have restarted the fabric but this restart has actually removed the existing fabric servers and created a new fresh fabric network. Because this is a clean fabric network, there now isn't a business network on the channel and you need to start again from scratch and install and start the business network. For example the startFabric.sh
script actually completely removes your existing fabric network and creates a new one and as such the business network and data is lost.
如果您想确保结构服务器在各种情况下都保留其信息,这些资源可能会为您提供帮助.
These resources may help you if you want to look into ensuring your fabric server persists it's information under various circumstances.
https://github.com/hyperledger /composer-knowledge-wiki/blob/latest/knowledge.md#fabricsetup (请参阅有关如何保持docker状态的部分)
https://github.com/hyperledger/composer-knowledge-wiki/blob/latest/knowledge.md#fabricsetup (see section on how to retain docker state)
这篇关于升级业务网络时,Hyperledger Composer v0.19.8错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!