1
votes

I am following this link https://github.com/hyperledger/fabric/blob/master/docs/Setup/Chaincode-setup.md

Followed all the below steps after running vagrant ssh.

First Terminal

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

Second Terminal

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

Third Terminal

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

Fourth Terminal

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

Fifth Terminal

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

This command fails with below error(and no response returned):-

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

Please help me. Stuck up at this point from long time.

1

1 Answers

0
votes

The command peer node start starts the peer in 'net' mode.

The steps at https://github.com/hyperledger/fabric/blob/master/docs/Setup/Chaincode-setup.md specify that you need to start the peer in 'dev' mode.

To start the peer in 'dev' mode you should use the command peer node start --peer-chaincodedev