【发布时间】:2020-05-29 02:46:33
【问题描述】:
我正在尝试在 Kubernetes 中运行 Fabric 2.0 测试网络(在本地,在 minikube 中),并且在安装或运行对等方的链代码时遇到问题(似乎是在 docker 容器中)。
我基于 docker-compose-test-net.yaml 创建了 kubernetes 文件,并成功部署了网络,生成了加密材料,创建并加入了通道,在对等节点上安装了链代码,提交了它的定义。但是当我尝试调用它时,出现以下错误:
Error: endorsement failure during invoke. response: status:500 message:"error in simulation:
failed to execute transaction 68e996b0d17c210af9837a78c0480bc7ba0c7c0f84eec7da359a47cd1f5c704a:
could not launch chaincode fabcar_01:bb76beb676a23a9be9eb377a452baa4b756cb1dc3a27acf02ecb265e1a7fd3df:
chaincode registration failed: container exited with 0"
我在该 pastebin 中包含了对等方的日志。我们可以在那里看到它启动了容器,但是我不明白它会发生什么:https://pastebin.com/yrMwG8Nd
然后我按照此处的说明进行了尝试:https://github.com/IBM/blockchain-network-on-kubernetes/issues/27。他们说的地方
IKS v1.11 及更高版本现在使用 containerd 作为其容器运行时 而不是 docker 引擎,因此不再使用 docker.sock 可能。
他们建议使用that file 和that file 部署一个docker pod (dind),并将unix:///host/var/run/docker.sock 的出现更改为tcp://docker:2375。
但是当我尝试安装链码时出现以下错误:
Error: chaincode install failed with status:
500 - failed to invoke backing implementation of 'InstallChaincode':
could not build chaincode:
docker build failed:
docker image inspection failed:
cannot connect to Docker endpoint
所以它似乎无法连接到 Docker 端点。但我找不到解决方法。
如果你有一个想法,那将有很大帮助!
【问题讨论】:
标签: kubernetes hyperledger-fabric