在尝试实例化链代码时,我总是在生命周期链代码(lscc)上收到超时错误,如下所示:
2018-04-06 12:36:50.210 UTC [chaincode] Launch -> ERRO 031 launchAndWaitForRegister failed Timeout expired while starting chaincode mycc:1.0(networkid:dev,peerid:org1-peer1,tx:3fa17e226a26f624d4554f7b64572672370838ddb53bc6ae21f0614c61737a51)
2018-04-06 12:36:50.211 UTC [endorser] simulateProposal -> ERRO 032 failed to invoke chaincode name:"lscc" on transaction 3fa17e226a26f624d4554f7b64572672370838ddb53bc6ae21f0614c61737a51, error: Timeout expired while starting chaincode mycc:1.0(networkid:dev,peerid:org1-peer1,tx:3fa17e226a26f624d4554f7b64572672370838ddb53bc6ae21f0614c61737a51)
永远不会创建链码容器。
编辑:当我按如下方式更改超时参数时,解决了超时问题:
以前(不工作):
CORE_CHAINCODE_DEPLOYTIMEOUT=600000
CORE_CHAINCODE_STARTUPTIMEOUT=600000
正确(工作):
CORE_CHAINCODE_DEPLOYTIMEOUT=300s
CORE_CHAINCODE_STARTUPTIMEOUT=300s