Cannot "Query" hyperledger-fabric, error code -32003

578 views Asked by At

I have a working Hyperledger-Fabric environment, running locally on my Mac. I setup the chaincode_example02 code, but the Query REST call isn't working. I trying doing a deploy and invoke and both of those calls work. I am using Postman to send the REST calls.

Query:


    {
      "jsonrpc": "2.0",
      "method": "query",
      "params": {
        "type": 1,
        "chaincodeID": {
        "name": "mycc",
        "path": "/tmp/hyperledger-BR/example0/gopath/src/github.com/chaincode_example02/chaincode_example02"
     },
        "ctorMsg": {
          "function": "query",
          "args": ["b"]
        }
      },
      "id": 0
    }

Serverside Error:

Error starting Simple chaincode: Error handling message: [ef980ad7-94c8-4ec9-92f4-3ebdd47e4321]Chaincode handler FSM cannot handle message (RANGE_QUERY_STATE) with payload size (10) while in state: ready

Postman Returned Error:

{ "jsonrpc": "2.0", "error": { "code": -32003, "message": "Query failure", "data": "Error when querying chaincode: Error:Failed to execute transaction or query(Timeout expired while executing transaction)"
}, "id": 0 }

I have been digging online, but I have no idea why this is happening. Any clue as to why this is happening?

0

There are 0 answers