Hyperledger Fabric chaincode instantiation returns timeout expired

北城以北 提交于 2020-01-05 09:01:15

问题


I've been working around with Fabric for a a few months now, and I've been trying to run a somewhat complex virtual machine, the Ethereum Virtual Machine within a chaincode. It is written in JavaScript so I worked with the nodeJS chaincode version. I packed the the VM with my chaincode in a directory that i install and instantiate onto the peer. The install completes and exits with no errors, however the instantiation after hanging for a few minutes returns me an error:

Error: Error endorsing chaincode: rpc error: code = Unknown desc = timeout expired while starting chaincode mychaincode:1.0(networkid:dev,peerid:peer0.org1.example.com,tx:.... 

It should run for quite a few minutes at least as the added packages are ~15MB, according to the example nodejs chaincode runs for a minute at least.

The example nodejs chaincode (chaincode_example02) runs perfectly on both BYFN network from the tutorial and on a basic-network that I've started. My environment was set up according to the documentation (v1.1.0) from the fabric-samples repository (v1.1.0). Even if I only add one package to the example chaincode with the require method, it hangs, than return error.

I've been searching for a flag or config where I can set the timeout value for chaincode instantiation, but with no luck. Where could I increase the timeout value? Which log should I provide in order to step forward in searching for the soution?

Thanks is advance, Balint


回答1:


You can modify the chaincode.startuptimeout config by adding a CORE_CHAINCODE_STARTUPTIMEOUT environment variable to the base/peer-base.yaml docker compose file specifying something other than the default.



来源:https://stackoverflow.com/questions/47662877/hyperledger-fabric-chaincode-instantiation-returns-timeout-expired

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!