Using fabric composer v0.7.0 I have deployed a business network to a Blockchain service on Bluemix (v0.6).
After the app runs for a while I get the following error:
throw er; // Unhandled 'error' event
^
Error
at ClientDuplexStream._emitStatusIfDone (/home/vcap/app/node_modules/grpc/src/node/src/client.js:189:19)
at ClientDuplexStream._receiveStatus (/home/vcap/app/node_modules/grpc/src/node/src/client.js:169:8)
This sometimes happens when executing the composer network deploy
command as well.
Ways to deal with this:
BusinessNetworkConnection.connect()
before every chaincode invoke to recreate the event hub connection. Please note that this is not very efficient, as making the connection takes a whileIf the error occurs when deploying with the
composer-cli
you may want to try executing the command again after a minute or so.Calling
BusinessNetworkConnection.ping()
during a set interval will not help with the issue because the problem is caused by the event hub, and events are only published on actual transactions.ping()
is a read-only chaincode query that does not create a transaction.