我正在使用超级账本结构v1,但网络无法启动。发生以下错误

时间:2018-06-25 09:32:58

标签: hyperledger-fabric blockchain

   =====================================================
   -----> starting network
   =====================================================

从档案开始业务网络:zerotoblockchain-network.bna 业务网络定义:     标识符:zerotoblockchain-network@0.1.5     说明:从零到区块链的教程网络

处理以下网络管理员:     用户名:admin

✔启动业务网络定义。这可能需要一分钟... 成功创建商务网卡:     文件名:networkadmin.card

命令成功

   =====================================================
   -----> importing networkadmin card
   =====================================================

错误:卡已存在:admin @ zerotoblockchain-network 命令失败

   =====================================================
   -----> pinging admin@zerotoblockchain-network card
   =====================================================

错误:找不到卡:admin @ zerotoblockchain-network 命令失败

   =====================================================
   -----> starting REST server
   =====================================================

   network archive, start and deploy script for the Zero To Blockchain Series
   This has been tested on Mac OSX thru High Sierra and Ubuntu V16 LTS
   This script will create your Composer archive
  

参数:          网络名称是:zerotoblockchain-network          ================================================== ===          ----->测试剩余服务器           完成后,            转到您喜欢的浏览器           然后输入localhost:3000 / explorer          ================================================== ===          ================================================== ===          ----->为admin @ zerotoblockchain-network启动rest服务器v0.15          ================================================== ===   从业务网络定义中发现类型...   连接失败:错误:找不到卡:admin @ zerotoblockchain-network   将为下一个请求重试。   异常:错误:找不到卡:admin @ zerotoblockchain-network   {错误:找不到卡:admin @ zerotoblockchain-network       在IdCard.fromDirectory.catch.cause上((/home/nikhil/.nvm/versions/node/v8.11.3/lib/node_modules/composer-rest-server/node_modules/composer-common/lib/cardstore/filesystemcardstore.js:74 :27)       在     原因:      {错误:无法读取所需的文件:metadata.json       在newErrorWithCause(/home/nikhil/.nvm/versions/node/v8.11.3/lib/node_modules/composer-rest-server/node_modules/composer-common/lib/idcard.js:36:19)       在fs.readFile.catch.cause(/home/nikhil/.nvm/versions/node/v8.11.3/lib/node_modules/composer-rest-server/node_modules/composer-common/lib/idcard.js:326:23 )       在        原因:         {错误:ENOENT:没有这样的文件或目录,请打开'/home/nikhil/.composer/cards/admin@zerotoblockchain-network/metadata.json'           errno:-2,           代码:“ ENOENT”,           syscall:“打开”,           路径:“ / home/nikhil/.composer/cards/admin@zerotoblockchain-network/metadata.json'}}

1 个答案:

答案 0 :(得分:0)

虽然效率不高,但是The docs(第一步)说,您必须在部署新网络之前删除所有卡。我也遇到过类似的问题。如果我在卡进口方面遇到麻烦,我通常只是从头开始。另外,您可以在终端机上进行composer card list来查看卡的确切名称。您可能会假设它是admin@zerotoblockchain-network