Instantiation of Chaincode using Fabric Node SDK gives API error (404): manifest for hyperledger/fabric-ccenv:latest not found

Instantiation of Chaincode using Fabric Node SDK gives API error (404): manifest for hyperledger/fabric-ccenv:latest not found

我正在尝试使用 Fabric Node SDK 在我的 Hyperledger Fabric 网络(在云上设置)上实例化 Golang 链码。但是,我在执行相同操作时遇到以下错误:

Error: error starting container: error starting container: Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:latest: API error (404): manifest for hyperledger/fabric-ccenv:latest not found: manifest unknown: manifest unknown

相同的堆栈跟踪是:

at self._endorserClient.processProposal (./node_modules/fabric-client/lib/Peer.js:140:36)
at Object.onReceiveStatus (./node_modules/grpc/src/client_interceptors.js:1207:9)
at InterceptingListener._callNext (./node_modules/grpc/src/client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (./node_modules/grpc/src/client_interceptors.js:618:8)
at callback (./node_modules/grpc/src/client_interceptors.js:845:24)

我也尝试在我的本地环境中直接拉取图像 hyperledger/fabric-ccenv 但也出现了类似的错误:

命令:

docker pull hyperledger/fabric-ccenv

错误:

Using default tag: latest
Error response from daemon: manifest for hyperledger/fabric-ccenv:latest not found: manifest unknown: manifest unknown

结构对等版本:1.4.4 Fabric 节点 SDK 版本:1.4.4

latest 标签不再可用。您必须使用特定的 tag。以下是 dave 组中 fabric-maintainers 评论的片段。

The Hyperledger Fabric maintainers are pleased to announce the availability of Fabric v2.2.0!

v2.2 continues to build on the v2.0 foundation with additional improvements and fixes. For details, check out the release notes:
https://github.com/hyperledger/fabric/releases/tag/v2.2.0

Additionally we are happy to announce that v2.2 is the next long-term support (LTS) release for Hyperledger Fabric. v2.2.x will be the target release for most fix backports, while the most important fixes will continue to be backported to v1.4.x as well.

More details of the LTS strategy can be found in the RFC that was merged earlier this year:
https://github.com/hyperledger/fabric-rfcs/blob/master/text/0000-lts-release-strategy.md

Finally, it is worth noting that the 'latest' tag on dockerhub images has been retired. We felt that the tag was too confusing, given that there is a combination of regular releases and LTS releases available now - the definition of 'latest' may not be the same for everyone. 

Give v2.2 a try and let us know what you think!
https://hyperledger-fabric.readthedocs.io/en/release-2.2/install.html```

link: https://chat.hyperledger.org/channel/fabric-maintainers?msg=dCMSGymRoWPiJ8fiv

我试图 install/instantiate 一年前的链代码,显然我没有更新任何依赖项,所以我也 运行 进入这个问题。

这个特定的 [hyperledger/fabric-ccenv:latest] docker pull 是由一个依赖项完成的,下面是解决方法。

为任何你想要的版本做一个 docker 拉取 fabric-ccenv

docker pull hyperledger/fabric-ccenv:2.1

然后标记为最新,

docker tag hyperledger/fabric-ccenv:2.1 hyperledger/fabric-ccenv:latest

现在,当您尝试安装链代码时,docker 拉取最新图像不会发生,因为带有标签的图像已经在您的机器上可用。

以上两个命令是您可以在启动脚本中添加的内容。

感谢@alpha 提到最新的标签已被删除。

如上文 alpha 所述,hyperledger/fabric-ccenvlatest 标签已不存在。

该值在core.yaml文件中定义为chaincode.builder,可以被环境变量CORE_CHAINCODE_BUILDER覆盖。

因此,解决问题的正确方法是将环境变量传递给具有首选 ccenv 版本的对等方。例如:

CORE_CHAINCODE_BUILDER: hyperledger/fabric-ccenv:2.1

请参阅 this commit 作为如何在 Helm 图表中使用它的示例。