Failed to generate platform-specific docker build: Error uploading input to container: API error ...

背景:

kafka多机部署
VM1:zookeeper0、kafka0、orderer0.example.com、peer0.org1.example.com
VM2:zookeeper1、kafka1、orderer1.example.com、peer1.org1.example.com
VM3:zookeeper2、kafka2、orderer2.example.com、peer0.org2.example.com
VM4:peer0.org2.example.com

使用Fabric CA,手动生成各种证书,集成到crypto-config目录下,并生成channel-artifacts。

错误

在执行./scripts/script.sh mychannel命令过程,在peer1.org2上执行查询chaincode时出现以下错误:

Error: endorsement failure during query. response: 
status:500 message:"failed to execute transaction 06152233000943095e5f17ea10ec3e6cb4b5e93c6b029d4ac09d16a1ef898315: 
error starting container: error starting container: 
Failed to generate platform-specific docker build:
 Error uploading input to container: API error (404): Could not find the file /chaincode/input in container 95854c94fad9783ec536f42e8ae35989a43834b220a4fcc381b6784d856f314c" 

解决

在网上搜索了很多,也没找到合适的解决方案。偶尔搜到一个韩国码农的博客,有关于这个问题的介绍。大意是ccenv的镜像有问题(我的是fabric是1.2的,ccenv是latest),所以就在将ccenv镜像删除(docker rmi -f imageid),然后重新下载:

docker image pull hyperledger/fabric-ccenv:1.2.0
docker image pull hyperledger/fabric-ccenv:latest

重新运行fabric网络,结果查询正常!可喜可贺,这个问题困扰了好几天,终于解决了!

最后附上韩国码农网站地址(都是韩语,建议在网站直接搜索关键词:platform-specific docker build:):
http://miiingo.tistory.com/category

    原文作者:通若
    原文地址: https://www.jianshu.com/p/eabd935efbd4
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞