4

The instantiation command completes successfully, but when analyzing peer logs, you may notice this:

2019-04-17 17:25:52.581 UTC [gossip.state] commitBlock -> DEBU 48c [canal-contrato] Committed block [1] with 1 transaction(s)

2019-04-17 17:25:52.581 UTC [common.deliver] deliverBlocks -> DEBU 48d [channel: canal-contrato] Delivering block for (0xc00023f9c0) for 192.168.16.1:48230

2019-04-17 17:25:52.581 UTC [fsblkstorage] waitForBlock -> DEBU 48e Going to wait for newer blocks. maxAvailaBlockNumber=[1], waitForBlockNum=[2]

2019-04-17 17:25:52.586 UTC [common.deliver] deliverBlocks -> DEBU 48f Context canceled, aborting wait for next block

2019-04-17 17:25:52.586 UTC [common.deliverevents] func1 -> DEBU 490 Closing Deliver stream

2019-04-17 17:25:52.586 UTC [comm.grpc.server] 1 -> INFO 491 streaming call completed {"grpc.start_time": "2019-04-17T17:25:50.441Z", "grpc.service": "protos.Deliver", "grpc.method": "DeliverFiltered", "grpc.peer_address": "192.168.16.1:48230", "error": "context finished before block retrieved: context canceled", "grpc.code": "Unknown", "grpc.call_duration": "2.144399922s"}

Can anyone orient me what I'm possibly doing wrong and what are the consequences of this error?

Notes:

  • The orderer logs don't present any type of error
  • All containers are running correctly
  • I'm using node version 8.9.0 (with npm 5.5.1)
  • I have 1 organization with 1 peer, 1 CA and 1 ordered (just to test)
  • I'm using hyperlegder fabric version 1.4
Community
  • 1
  • 1
  • I think you need to check context timeouts. Look for code fragments that are using `context.WithTimeout()`. – Vitaly Isaev Apr 17 '19 at 20:24
  • If you're developing this code, you need to search for the places where client performs GRPC requests to the server. Every GRPC request has a context, so you need to check who's setting timeouts for these contexts. And probably increase these timeouts. – Vitaly Isaev Apr 18 '19 at 11:58
  • Sorry for the noob question, but where I suppose to make this possible modification? I'm following a structure like balance-transfer example (fabric-samples) but with a chaincode deployed in node.js. – Nadine Meyer Ouro Apr 18 '19 at 12:01
  • I'm afraid I cannot answer this question because I'm not hyperledger user. If you're working with this software as a system engineer or devops rather than a developer, try to analyze configuration files. Perhaps there are timeout settings. Looks like the requests are timeouting after 2 seconds (as I can see from your logs). – Vitaly Isaev Apr 18 '19 at 12:32

1 Answers1

8

This is not an error. You are using an SDK that connects to the peer and waits for the instantiate to finish. The block is received by the peer, and when it does - the SDK closes the gRPC stream because it doesn't need it anymore, and the peer logs this to notify you why it closed the stream from the server side.

yacovm
  • 5,120
  • 1
  • 11
  • 21