While trying to instantiate a chaincode, I always get a timeout error on lifecycle chaincode (lscc) as follows:
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)
And chaincode container is never created.
EDIT: Timeout issue is solved when I changed the timeout parameters as follows:
Previously (not working):
CORE_CHAINCODE_DEPLOYTIMEOUT=600000
CORE_CHAINCODE_STARTUPTIMEOUT=600000
Correct (working):
CORE_CHAINCODE_DEPLOYTIMEOUT=300s
CORE_CHAINCODE_STARTUPTIMEOUT=300s