I'm trying to run a custom chaincode. I was able to deploy it successfully but when I run the invoke command using:
peer chaincode invoke -n mycc -c '{"Args":["write","hello_world", "200"]}'
Facing this error message:
Error: Error endorsing chaincode: rpc error: code = 2 desc = Error deploying chaincode: Failed to launch chaincode spec(Could not get deployment transaction from LCCC for mycc - Error deploying chaincode: Transaction or query returned with failure: transaction not found default/mycc)
Logs after successful deployment of chaincode on peer (Running peer in DEV mode):
13:48:06.320 [shim] INFO : Chaincode log level not provided; defaulting to: DEBUG
13:48:06.320 [shim] DEBU : Peer address: 0.0.0.0:7051
13:48:06.321 [shim] DEBU : os.Args returns: [./chaincode_start]
13:48:06.323 [shim] DEBU : Registering.. sending REGISTER
13:48:06.324 [shim] DEBU : []Received message REGISTERED from shim
13:48:06.325 [shim] DEBU : []Handling ChaincodeMessage of type: REGISTERED(state:created)
13:48:06.325 [shim] DEBU : Received REGISTERED, ready for invocations
13:54:16.458 [shim] DEBU : [lccc]Received message INIT from shim
13:54:16.458 [shim] DEBU : [lccc]Handling ChaincodeMessage of type: INIT(state:established)
13:54:16.458 [shim] DEBU : Entered state init
13:54:16.458 [shim] DEBU : [lccc]Received INIT, initializing chaincode
13:54:16.461 [shim] DEBU : [lccc]Inside putstate
13:54:16.461 [shim] DEBU : [lccc]Sending PUT_STATE
13:54:16.462 [shim] DEBU : [lccc]Received message RESPONSE from shim
13:54:16.462 [shim] DEBU : [lccc]Handling ChaincodeMessage of type: RESPONSE(state:init)
13:54:16.462 [shim] DEBU : [lccc]before send
13:54:16.462 [shim] DEBU : [lccc]after send
13:54:16.464 [shim] DEBU : [lccc]Received RESPONSE, communicated (state:init)
13:54:16.464 [shim] DEBU : [lccc]Received RESPONSE. Successfully updated state
13:54:16.464 [shim] DEBU : [lccc]Init succeeded. Sending COMPLETED
13:54:16.464 [shim] DEBU : [lccc]Move state message COMPLETED
13:54:16.464 [shim] DEBU : [lccc]Handling ChaincodeMessage of type: COMPLETED(state:init)
13:54:16.465 [shim] DEBU : [lccc]send state message COMPLETED
Any pointer on where I am going wrong would be great. Thanks in advance.