Re: Errors with the Tutorial -- Commercial Paper -- Install and Approve the Smart Contract As...


Nikhil Gupta
 

Hi Paul,

This message states that you have already approved the chaincode definition as this org. The chaincode definition with sequence 1 has already been defined for that organization, and you cannot define the same sequence again. My guess from the tutorial is that you have either already approved the chaincode definition for Org1/digibank, or that you did not set the environment variables correctly and are targeting the command to magnetocorp.

Nik



-----fabric@... wrote: -----
To: fabric@...
From: "Paul Vincent Contreras"
Sent by: fabric@...
Date: 03/02/2020 04:10AM
Subject: [EXTERNAL] [Hyperledger Fabric] Errors with the Tutorial -- Commercial Paper -- Install and Approve the Smart Contract As...

Hello,

I am referring to this tutorial:

https://hyperledger-fabric.readthedocs.io/en/latest/tutorial/commercial_paper.html#install-and-approve-the-smart-contract-as-digibank

I was able to finish the steps and succesfully run the commands for MagnetoCorp but when I then switch to Digibank or in that link above and run the commands,

peer lifecycle chaincode approveformyorg --orderer localhost:7050 --ordererTLSHostnameOverride orderer.example.com --channelID mychannel --name papercontract -v 0 --package-id $PACKAGE_ID --sequence 1 --tls --cafile $ORDERER_CA

I don’t understand why I get an error message in the terminal:

500 - failed to invoke backing implementation of 'ApproveChaincodeDefinitionForMyOrg': attempted to redefine uncommitted sequence (1) for namespace papercontract with unchanged content

On the DigiBank monitordocker.sh terminal, the messages are:

              couchdb1|[notice] 2020-03-02T09:04:38.218621Z nonode@nohost <0.1269.1> ad8044c538 couchdb1:5984 172.28.0.5 undefined GET /mychannel__lifecycle/namespaces%2Fmetadata%2Fpapercontract?attachments=true 404 ok 1
              couchdb1|[notice] 2020-03-02T09:04:38.220351Z nonode@nohost <0.1269.1> 31ca89d3f2 couchdb1:5984 172.28.0.5 undefined GET /mychannel_lscc/papercontract?attachments=true 404 ok 2
peer0.org2.example.com|2020-03-02 09:04:38.222 UTC [endorser] callChaincode -> INFO 076 finished chaincode: _lifecycle duration: 5ms channel=mychannel txID=ba89eec4
peer0.org2.example.com|2020-03-02 09:04:38.222 UTC [comm.grpc.server] 1 -> INFO 077 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.28.0.1:46736 grpc.code=OK grpc.call_duration=6.002844ms
   orderer.example.com|2020-03-02 09:04:38.227 UTC [orderer.common.broadcast] Handle -> WARN 06c Error reading from 172.28.0.1:47102: rpc error: code = Canceled desc = context canceled
   orderer.example.com|2020-03-02 09:04:38.227 UTC [comm.grpc.server] 1 -> INFO 06d streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=172.28.0.1:47102 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=10.660494ms
              couchdb1|[notice] 2020-03-02T09:04:38.222898Z nonode@nohost <0.1269.1> 4a9385050b couchdb1:5984 172.28.0.5 undefined GET /mychannel__lifecycle/namespaces%2Ffields%2Fpapercontract%2FSequence?attachments=true 404 ok 2



I just followed the tutorial as is up until the peer lifecycle chaincode approveformy org for Digibank.


Please help.



Truly yours,


Paul Vincent C.

Join fabric@lists.hyperledger.org to automatically receive all group messages.