I am trying to deploy Hyperledger Fabric on Kubernetes. Everything is working fine other than peer chaincode instantiate
. Whenever I try to instantiate chaincode it keeps waiting for around 10-15 mins and then it throws timeout error as shown below:
Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg failed to execute transaction b7ce8fa6259e6004481b829660dd2365f8503153047b3d9132393180e2591f0a: timeout expired while starting chaincode mycc:1.0 for transaction b7ce8fa6259e6004481b829660dd2365f8503153047b3d9132393180e2591f0a
On the peer side, I get the following error:
2018-08-28 12:55:10.122 UTC [dev-peer0.example.com-mycc-1.0] func2 -> INFO 04e[0m Error creating new Smart Contract: error trying to connect to local peer: context deadline exceeded[31m2018-08-28 12:55:10.121 UTC [shim] userChaincodeStreamGetter -> ERRO 001[0m context deadline exceeded
2018-08-28 12:55:10.123 UTC [dev-peer0.example.com-mycc-1.0] func2 -> INFO 04f[0m error trying to connect to local peer
2018-08-28 12:55:10.123 UTC [dev-peer0.example.com-mycc-1.0] func2 -> INFO 050[0m github.com/hyperledger/fabric/core/chaincode/shim.userChaincodeStreamGetter
2018-08-28 12:55:10.123 UTC [dev-peer0.example.com-mycc-1.0] func2 -> INFO 051[0m /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:111
2018-08-28 12:55:10.123 UTC [dev-peer0.example.com-mycc-1.0] func2 -> INFO 052[0m github.com/hyperledger/fabric/core/chaincode/shim.Start
2018-08-28 12:55:10.123 UTC [dev-peer0.example.com-mycc-1.0] func2 -> INFO 053[0m /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:150
2018-08-28 12:55:10.123 UTC [dev-peer0.example.com-mycc-1.0] func2 -> INFO 054[0m main.main
2018-08-28 12:55:10.123 UTC [dev-peer0.example.com-mycc-1.0] func2 -> INFO 055[0m /chaincode/input/src/github.com/chaincode/fabcar/go/fabcar.go:200
2018-08-28 12:55:10.123 UTC [dev-peer0.example.com-mycc-1.0] func2 -> INFO 056[0m runtime.main
2018-08-28 12:55:10.123 UTC [dev-peer0.example.com-mycc-1.0] func2 -> INFO 057[0m /opt/go/src/runtime/proc.go:198
2018-08-28 12:55:10.123 UTC [dev-peer0.example.com-mycc-1.0] func2 -> INFO 058[0m runtime.goexit
2018-08-28 12:55:10.123 UTC [dev-peer0.example.com-mycc-1.0] func2 -> INFO 059[0m /opt/go/src/runtime/asm_amd64.s:2361
2018-08-28 12:55:10.166 UTC [dockercontroller] func2 -> INFO 05a[0m Container dev-peer0.example.com-mycc-1.0 has closed its IO channel
Full Logs can be found here => https://hastebin.com/ibukeyakax.coffeescript
Any suggestion/help would be really appreciated.
I found the solution. Adding CORE_PEER_ADDRESSAUTODETECT
variable in env fixed the issue.
So you should add
- name: CORE_PEER_ADDRESSAUTODETECT
value: "true"
into your env