问题描述
我正在尝试在Kubernetes上部署Hyperledger Fabric.除了peer chaincode instantiate
之外,其他所有功能都正常运行.每当我尝试实例化chaincode时,它都会等待大约10-15分钟,然后抛出超时错误,如下所示:
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
完整日志可在此处找到=> https://hastebin.com/ibukeyakax.coffeescript
Full Logs can be found here => https://hastebin.com/ibukeyakax.coffeescript
任何建议/帮助都将不胜感激.
Any suggestion/help would be really appreciated.
推荐答案
我找到了解决方案.在环境中添加CORE_PEER_ADDRESSAUTODETECT
变量可以解决此问题.
I found the solution.Adding CORE_PEER_ADDRESSAUTODETECT
variable in env fixed the issue.
所以您应该添加
- name: CORE_PEER_ADDRESSAUTODETECT
value: "true"
进入您的环境
这篇关于使用Kubernetes的Hyperledger Fabric:无法实例化Chaincode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!