Node client: "Error: 14 UNAVAILABLE: Connection dropped" - How to Suppress or Resolve


Simeon MacMillen
 

I am getting an occasional "Error: 14 UNAVAILABLE: Connection dropped" when calling Fabric chaincode via evaluateTransaction from my Node client.  I haven't figured out the trigger for this error (it seems sporadic), but when it occurs, I am usually able to reset the gateway and then re-run the transaction without issue.

Is it possible to suppress the error output that results from calling contract.evaluateTransaction(...) ?  This would allow me to more gracefully deal with the error in the background.

Alternately (and probably preferably),

Is it possible to prevent this error?


Regards,
Simeon MacMillen

Ref 1: nodeJS function code: https://pastebin.com/rcSv7APs
Ref 2: Client terminal output: https://pastebin.com/ArPW0Xdj


Error Output:

2021-04-27T14:21:05.216Z - error: [Endorser]: sendProposal[peer0.orga.scm.com:7051] - Received error response from: grpcs://peer0.orga.scm.com:7051 error: Error: 14 UNAVAILABLE: Connection dropped

2021-04-27T14:21:05.225Z - error: [Endorser]: sendProposal[peer0.orga.scm.com:7051] - rejecting with: Error: 14 UNAVAILABLE: Connection dropped
2021-04-27T14:21:05.227Z - error: [SingleQueryHandler]: evaluate: message=Query failed. Errors: ["Error: 14 UNAVAILABLE: Connection dropped"], stack=FabricError: Query failed. Errors: ["Error: 14 UNAVAILABLE: Connection dropped"]
    at SingleQueryHandler.evaluate (/app/node_modules/fabric-network/lib/impl/query/singlequeryhandler.js:47:23)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at async Transaction.evaluate (/app/node_modules/fabric-network/lib/transaction.js:276:25)
    at async queryOrder (/app/app.js:231:12)
    at async UIqueryOrder (/app/app.js:815:3)
    at async switchboard (/app/app.js:1596:6)
    at async main (/app/app.js:1761:4), name=FabricError

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