Hyperledger Fabric弹珠v3演示 - 实例化链码时失败

时间:2017-04-23 15:37:21

标签: hyperledger hyperledger-fabric

我正在测试http://fabric-rtd.readthedocs.io/en/latest/marbles.html中的marbles.v3演示,并在实例化链码时遇到错误。我已经仔细检查过blockchain_creds1.json并且链码_id和chaincode_version被正确编辑了

日志:

error: [Peer.js]: GRPC client got an error response from the peer 
"grpc://localhost:7051". Error: Timeout expired while starting chaincode end2end:v0(networkid:dev,peerid:peer0,tx:ec4161b7f14893d1142a836fb552e0a8eb4b5653ad4191e946e11ba4a7191993)
    at /home/eric/blockchain-demo/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17
error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Timeout expired while starting chaincode end2end:v0(networkid:dev,peerid:peer0,tx:ec4161b7f14893d1142a836fb552e0a8eb4b5653ad4191e946e11ba4a7191993)
    at /home/eric/blockchain-demo/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17
error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:8051". Error: Timeout expired while starting chaincode end2end:v0(networkid:dev,peerid:peer2,tx:ec4161b7f14893d1142a836fb552e0a8eb4b5653ad4191e946e11ba4a7191993)
    at /home/eric/blockchain-demo/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17
error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Timeout expired while starting chaincode end2end:v0(networkid:dev,peerid:peer2,tx:ec4161b7f14893d1142a836fb552e0a8eb4b5653ad4191e946e11ba4a7191993)
    at /home/eric/blockchain-demo/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17
error: [install-chaincode]: instantiate proposal was bad
error: [install-chaincode]: instantiate proposal was bad
not ok 3 Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting...

由于容器正在运行,不确定为什么它无法连接到对等端:

[root@DEV1 fabric-sdk-node]# docker ps
CONTAINER ID        IMAGE                        COMMAND                  CREATED             STATUS              PORTS                                            NAMES
3e79a4a80992        hyperledger/fabric-peer      "peer node start -..."   36 minutes ago      Up 36 minutes       0.0.0.0:8056->7051/tcp, 0.0.0.0:8058->7053/tcp   peer3
71fe64571dc6        hyperledger/fabric-peer      "peer node start -..."   36 minutes ago      Up 36 minutes       0.0.0.0:7056->7051/tcp, 0.0.0.0:7058->7053/tcp   peer1
08cecbc1cd94        hyperledger/fabric-peer      "peer node start -..."   36 minutes ago      Up 36 minutes       0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp   peer0
41e7f50fe897        hyperledger/fabric-peer      "peer node start -..."   36 minutes ago      Up 36 minutes       0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp   peer2
7182a3c2ad7d        hyperledger/fabric-ca        "sh -c 'fabric-ca-..."   37 minutes ago      Up 36 minutes       0.0.0.0:7054->7054/tcp                           ca_peerOrg1
f8b529fdd7ec        hyperledger/fabric-orderer   "orderer"                37 minutes ago      Up 36 minutes       0.0.0.0:7050->7050/tcp                           orderer0
ca83ab5db256        hyperledger/fabric-ca        "sh -c 'fabric-ca-..."   37 minutes ago      Up 36 minutes       0.0.0.0:8054->7054/tcp                           ca_peerOrg2
b68cf9ee6725        couchdb                      "tini -- /docker-e..."   37 minutes ago      Up 36 minutes       0.0.0.0:5984->5984/tcp                           couchdb

任何帮助将被赞赏Thx All =)

1 个答案:

答案 0 :(得分:0)

我建议检查对等体的日志,看看它失败的原因。

例如,由于超时与peer0交谈,请按以下方式检查peer0的日志:

docker logs peer0