Kubernetes中的Fabric v2.0(minikube)-在对等内部运行docker以运行链码的问题

问题描述 投票:0回答:1

[我正在尝试在Kubernetes(本地,在minikube中)中运行Fabric 2.0测试网络,并且在对等方(似乎是在Docker容器中)面临着安装或运行chaincode的问题。

我基于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"

我在该粘贴框中包含了对等方的日志。我们可以在其中看到它启动了容器,但是后来我不明白它会发生什么:https://pastebin.com/yrMwG8Nd


然后我按照此处的解释进行了尝试:https://github.com/IBM/blockchain-network-on-kubernetes/issues/27。他们在哪里说

IKS v1.11及更高版本现在使用容器化作为其容器运行时而不是Docker引擎,因此不再使用docker.sock可能。

[他们建议使用that filethat file部署docker pod(dind),并将unix:///host/var/run/docker.sock的出现更改为tcp:// docker:2375。] >

但是当我尝试安装chaincode时,出现以下错误:

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(本地,在minikube中)中运行Fabric 2.0测试网络,并且面临同龄人安装或运行chaincode的问题(似乎在docker容器中...) >

kubernetes hyperledger-fabric
1个回答
1
投票

我发现了我的问题:

对于同龄人,我正在设置:

© www.soinside.com 2019 - 2024. All rights reserved.