1

我正在关注此链接https://github.com/hyperledger/fabric/blob/master/docs/Setup/Chaincode-setup.md

运行后遵循以下所有步骤vagrant ssh

第一航站楼

cd $GOPATH/src/github.com/hyperledger/fabric && make membersrvc && membersrvc

第二航站楼

cd $GOPATH/src/github.com/hyperledger/fabric/ && ./orderer

第三航站楼

cd $GOPATH/src/github.com/hyperledger/fabric && make peer && peer node start

第四航站楼

cd $GOPATH/src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 && go build && CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02

第五航站楼

peer chaincode deploy -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -n mycc -c '{"Args": ["i
nit", "a","100", "b", "200"]}'

此命令失败并出现以下错误(并且没有返回响应):-

00:38:07.178 [chaincode] Launch -> DEBU 0ce sending init completed
00:38:07.178 [chaincode] Launch -> DEBU 0cf LaunchChaincode complete
**00:38:07.205 [chaincode] processStream -> ERRO 0d0 Error handling chaincode support stream: stream error: code = 1 desc = "context canceled"**
00:38:07.230 [chaincode] deregisterHandler -> DEBU 0d1 Deregister handler: 418d7ac89eb66fc076b6e1f90cd3c445ebac8ecfb84f6914a101fde33ecca9b37cddf535f464fa5a3f336541992fe008ba7cf0f2aff9f23facc79ee5dd12c4d5
00:38:07.230 [chaincode] deregisterHandler -> DEBU 0d2 Deregistered handler with key: 418d7ac89eb66fc076b6e1f90cd3c445ebac8ecfb84f6914a101fde33ecca9b37cddf535f464fa5a3f336541992fe008ba7cf0f2aff9f23facc79ee5dd12c

请帮我。很久以来一直在这一点上卡住。

4

1 回答 1

0

该命令peer node start以“网络”模式启动对等体。

https://github.com/hyperledger/fabric/blob/master/docs/Setup/Chaincode-setup.md中的步骤指定您需要以“开发”模式启动对等方。

要以“开发”模式启动对等体,您应该使用命令peer node start --peer-chaincodedev

于 2016-11-02T05:48:00.810 回答