Re: Unable to Query data from Hyperledger Fabric #fabric-chaincode #hyperledger-fabric #couchdb


David Enyeart
 

The query appears to be a JSON find query. These queries will be slow or time out if they do not utilize a well designed index against the JSON data. See the CouchDB tutorial for more details:
https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_tutorial.html


Dave Enyeart

hiteshdutt05---01/08/2021 04:03:52 AM---Hi, While trying to get data from hyperledger fabric, we are getting following error at client side

From: hiteshdutt05@...
To: fabric@...
Date: 01/08/2021 04:03 AM
Subject: [EXTERNAL] [Hyperledger Fabric] Unable to Query data from Hyperledger Fabric #couchdb #fabric-chaincode #hyperledger-fabric
Sent by: fabric@...





Hi,

While trying to get data from hyperledger fabric, we are getting following error at client side

"Error While Query\nERROR:Error: error getting results for query response \nerror: QUERY_STATE_NEXT failed: transaction ID: cda38a1c382867183db359d129ac7a9ea81ed4c60088a2dc03a0bd77fc9c2c59: error reading response body: net/http: request canceled (Client.Timeout exceeded while reading body)"

and observing following error on peer node:

←[33m2021-01-08 08:57:17.005 UTC [couchdb] handleRequest -> WARN 3da←[0m Retrying couchdb request in 125ms. Attempt:1 Error:Post http://localhost:5984/prod-nld_new$c$c/_find: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

←[33m2021-01-08 08:57:52.131 UTC [couchdb] handleRequest -> WARN 3db←[0m Retrying couchdb request in 250ms. Attempt:2 Error:Post http://localhost:5984/prod-nld_new$c$c/_find: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

←[33m2021-01-08 08:58:27.383 UTC [couchdb] handleRequest -> WARN 3dc←[0m Retrying couchdb request in 500ms. Attempt:3 Error:Post http://localhost:5984/prod-nld_new$c$c/_find: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

←[33m2021-01-08 08:59:02.883 UTC [couchdb] handleRequest -> WARN 3dd←[0m Retrying couchdb request in 1s. Attempt:4 Error:Post http://localhost:5984/prod-nld_new$c$c/_find: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

←[31m2021-01-08 08:59:03.883 UTC [chaincode] HandleTransaction -> ERRO 3de←[0m [274987ba] Failed to handle GET_QUERY_RESULT. error: Post http://localhost:5984/prod-nld_new$c$c/_find: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleGetQueryResult

/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:905

github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleTransaction

/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:276

runtime.goexit

/opt/go/src/runtime/asm_amd64.s:1337

GET_QUERY_RESULT failed: transaction ID: 274987ba0d1fbec4fc9ae92df024caa9f069e2d5732672f18b0b45b98d05624f

github.com/hyperledger/fabric/core/chaincode.(*Handler).HandleTransaction

/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:280

runtime.goexit

/opt/go/src/runtime/asm_amd64.s:1337

Need help in understanding root cause of why this could be happening.




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