Hyperledger Composer v0.20.0网络启动错误

时间:2019-02-22 21:19:14

标签: docker hyperledger-fabric hyperledger hyperledger-composer

Composer v0.20.0

Fabric v1.2.1(docker容器)

节点v8.15.0

MacOS

当我尝试使用{"getresponse":{"$":{"unpagedCount":"10"},"partner":[{"$":{"id":"p1e","type":"content","name":"myname","status":"active","email":"me@here.com","peopleIds":"9","personIds":"9"},"ketchup":[""]}]}} 命令时遇到错误。我正在关注本教程:https://hyperledger.github.io/composer/v0.19/tutorials/deploy-to-fabric-single-org

步骤:

1)

composer network start

如果我运行cd ~/fabric-dev-servers export FABRIC_VERSION=hlfv12 ./stopFabric.sh ./teardownFabric.sh ./downloadFabric.sh ./startFabric.sh

docker container ls

然后我跑了CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 64e6d6746649 hyperledger/fabric-peer:1.2.1 "peer node start" 31 seconds ago Up 30 seconds 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com f2ee3f2a68f7 hyperledger/fabric-couchdb:0.4.10 "tini -- /docker-ent…" 32 seconds ago Up 31 seconds 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb 41e9a4987f6f hyperledger/fabric-orderer:1.2.1 "orderer" 32 seconds ago Up 31 seconds 0.0.0.0:7050->7050/tcp orderer.example.com 1673c6691baf hyperledger/fabric-ca:1.2.1 "sh -c 'fabric-ca-se…" 32 seconds ago Up 31 seconds 0.0.0.0:7054->7054/tcp ca.org1.example.com

2)

rm -fr ~/.composer

我回来了:

composer card create -p connection.json -u PeerAdmin -c ~/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem -k ~/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/114aab0e76bf0c78308f89efc4b8c9423e31568da0c340ca187a9b17aa9a4457_sk -r PeerAdmin -r ChannelAdmin

3)

Successfully created business network card file to 
    Output file: PeerAdmin@mogvl-net.card

Command succeeded

我回来了:

composer card import -f PeerAdmin@mogvl-net.card

4)

Successfully imported business network card
    Card file: PeerAdmin@mogvl-net.card
    Card name: PeerAdmin@mogvl-net

Command succeeded

我回来了:

composer network install -c PeerAdmin@mogvl-net -a dist/mogvl-network.bna

5)

✔ Installing business network. This may take a minute...
Successfully installed business network mogvl-network, version 0.2.6

Command succeeded

我又收到了此错误:

composer network start --networkName mogvl-network --networkVersion 0.2.6 -A admin -S adminpw -c PeerAdmin@mogvl-net 

我觉得我已经接近了,需要做的只是一个较小的修复,但是我不确定。

1 个答案:

答案 0 :(得分:0)

似乎问题是npm版本。当chaincode容器第一次启动时,对等节点使用npm install在容器内部下载并安装智能合约的依赖项(例如fabric-shim)。尝试升级您的npm版本:

  

npm i npm @ latest -g