Hyperledger composer v0.19 with Fabric 0.11 zerotoblockchain-network.card安装问题

时间:2018-04-07 17:25:52

标签: hyperledger-fabric hyperledger-composer

我正在查看https://github.com/rddill-IBM/ZeroToBlockchain

Description:    Ubuntu 16.04.4 LTS
Release:    16.04
Codename:   xenial

本教程最初使用的是composer v0.16和olde fabric版本。 然而,将结构升级到0.11后 - 只有作曲家v0.19才能工作。 我使用升级到v0.19.0  npm install -g composer-cli@0.19.0

发布此升级后,我在第03章上的./buildAndDeploy仍然失败了  ----->启动网络 找不到管理员admin @ zerotoblockchain-network。

所以,我创建了一张新卡片。

 ~/fabric-tools/fabric-scripts/hlfv11$ composer card create -n zerotoblockchain-network -u admin -p DevServer_connection.json -f /tmp/zerotoblockchain-network

~/fabric-tools/fabric-scripts/hlfv11$ composer card import -f /tmp/zerotoblockchain-network.card 

我知道不应该使用DevServer_connection.json,因为PeerAdmin文件正在使用它,但我不知道要使用哪个密钥文件

现在,buildAndDeploy在

处失败
      =====================================================
       -----> starting rest server v0.15 for admin@zerotoblockchain-network
       =====================================================
Discovering types from business network definition ...
Connection fails: Error: Error trying login and get user Context. Error: Error trying to enroll user or load channel configuration. Error: Enrollment failed with errors [[{"code":20,"message":"Authorization failure"}]]
It will be retried for the next request.
Exception: Error: Error trying login and get user Context. Error: Error trying to enroll user or load channel configuration. Error: Enrollment failed with errors [[{"code":20,"message":"Authorization failure"}]]
Error: Error trying login and get user Context. Error: Error trying to enroll user or load channel configuration. Error: Enrollment failed with errors [[{"code":20,"message":"Authorization failure"}]]
    at client.getUserContext.then.then.catch (/home/user/.nvm/versions/node/v8.11.1/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:360:34)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

请帮忙。

1 个答案:

答案 0 :(得分:1)

我猜您的意思是Hyperledger Composer v0.16v0.19以及Hyperledger Fabric v1.0v1.1

根据发行说明here,如果您使用的是Hyperledger Fabric v0.16,则需要坚持使用Hyperledger Composer v1.0。要在撰写本文时使用Hyperledger Composer v0.17及更高版本(最多v0.19),您需要使用Hyperledger Fabric v1.1

要安装最新版本的Hyperledger Composer v0.16,您可以使用:

npm install -g hyperledger-composer@'~0.16'

如果您使用composer-clicomposer-playground,请执行相同步骤:

npm install -g composer-cli@'~0.16'
npm install -g composer-playground@'~0.16'