Welcome to the Linux Foundation Forum!

Lab 4.1. Pag 29. chaincode invoke error

Hello there, I almost complete lab 4.1. Everything looks good up to the last test for chain-code invocation.

When I check with querycommited everything looks good:

  1. peer lifecycle chaincode querycommitted --channelID mychannel --name simple_chaincode\
  2. --cafile ${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
  3.  
  4. Committed chaincode definition for chaincode 'simple_chaincode' on channel 'mychannel':
  5.  
  6. Version: 1.0, Sequence: 1, Endorsement Plugin: escc, Validation Plugin: vscc, Approvals: [Org1MSP: true, Org2MSP: true]

but then the invoke of put instructions fails:

  1. peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls \
  2. --cafile ${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem \
  3. -C mychannel -n simple_chaincode --peerAddresses localhost:7051 \
  4. --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051 \
  5. --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt \
  6. -c '{"function":"put", "Args":["k","v"]}'
  7.  
  8. Error: endorsement failure during invoke. response: status:500
  9. message:"make sure the chaincode simple_chaincode has been successfully defined on channel mychannel and try again:
  10. chaincode definition for 'simple_chaincode' exists, but chaincode is not installed"

Any tip is greatly appreciated!

Comments

  • I found the problem... I hadn't installed the chaincode on one of the peers. Kind of odd that I was able to approve and commit it without it being installed. But that's it. I won't delete this post in the case is useful to someone else.

  • Posts: 193

    :)

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training