peer lifecycle chaincode commit error 500


Antoni Massó Mola <antonimassomola@...>
 

Hello,

Im stuck at the peer lifecycle chaincode commit command.
I execute the following commands until I get an error on the above command.

export CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peerOrganizations/org2/users/Admin@org2/msp
export CORE_PEER_ADDRESS=peer0-org2-service:10051
export CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peerOrganizations/org2/peers/org2-peer0.default.svc.cluster.local/tls/ca.crt
export CORE_PEER_LOCALMSPID=org2

peer lifecycle chaincode package o-test7.tar.gz --path /chainset/hyperledger-config/chaincode/src/o-test --label o-test7
 
peer lifecycle chaincode install o-test7.tar.gz
 
peer lifecycle chaincode approveformyorg --tls lifecycle chaincode approveformyorg -o orderer0-service:7050 --tls --cafile /etc/hyperledger/orderers/msp/tlscacerts/ca-root-7054.pem --channelID o-testing --name o-test7 --version 1 --init-required --sequence 1 --waitForEvent --signature-policy "OR ('org2.peer')" --package-id o-test7:757e5f9ddab38a34b8086649fce8a7de4be1567f2cb3249cbecad1c54f80e96d
 
peer lifecycle chaincode approveformyorg -o orderer0-service:7050 --tls --cafile /etc/hyperledger/orderers/msp/tlscacerts/ca-root-7054.pem --channelID o-testing --name o-test7 --version 1 --sequence 1 --waitForEvent --signature-policy "OR ('org2.peer')" --package-id o-test7:757e5f9ddab38a34b8086649fce8a7de4be1567f2cb3249cbecad1c54f80e96d
 
peer lifecycle chaincode checkcommitreadiness --channelID o-testing --name o-test7 --version 1 --sequence 1 --signature-policy "OR ('org2.peer')" --output json

{
"approvals": {
"org1": false,
"org2": true
}
}
peer lifecycle chaincode commit -o orderer0-service:7050 --tls --cafile /etc/hyperledger/orderers/msp/tlscacerts/ca-root-7054.pem --channelID o-testing --name o-test7 --version 1 --sequence 1 --init-required --signature-policy "OR ('org2.peer')" --peerAddresses peer0-org2-service:9051 --tlsRootCertFiles /etc/hyperledger/fabric/peerOrganizations/org2/peers/org2-peer0.default.svc.cluster.local/tls/ca.crt

Error: proposal failed with status: 500 - failed to invoke backing implementation of 'CommitChaincodeDefinition': chaincode definition not agreed to by this org (org2)

Any idea what I'm doing wrong?

Thanks

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