4

我正在尝试使用 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

Fabric Peer 版本:1.4.4 Fabric 节点 SDK 版本:1.4.4

4

3 回答 3

8

正如上面的alpha所述,latest标签 forhyperledger/fabric-ccenv不再存在。

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

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

CORE_CHAINCODE_BUILDER: hyperledger/fabric-ccenv:2.1

将此提交视为如何在 Helm 图表中使用它的示例。

于 2020-07-16T12:40:14.557 回答
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```

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

于 2020-07-12T15:02:43.083 回答
4

我试图安装/实例化一年前的链代码,显然我没有更新任何依赖项,所以我也遇到了这个问题。

这个特殊的 [ hyperledger/fabric-ccenv:latest] docker pull 是由一个依赖项完成的,接下来就是解决这个问题的方法。

fabric-ccenv为您想要的任何版本执行 docker pull 。

docker pull hyperledger/fabric-ccenv:2.1

然后将其标记为最新,

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

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

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

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

于 2020-07-12T20:20:18.923 回答