Hyperledger fabric 使用Fabric Node SDK实例化链码时出现API错误(404):hyperledger/Fabric ccenv的清单:未找到最新版本

Hyperledger fabric 使用Fabric Node SDK实例化链码时出现API错误(404):hyperledger/Fabric ccenv的清单:未找到最新版本,hyperledger-fabric,hyperledger-chaincode,hyperledger-fabric-sdk-js,Hyperledger Fabric,Hyperledger Chaincode,Hyperledger Fabric Sdk Js,我正在尝试使用Fabric Node SDK在Hyperledger结构网络(云上设置)上实例化一个Golang链码。但是,在执行相同操作时,我面临以下错误: Error: error starting container: error starting container: Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:latest: API error (4

我正在尝试使用Fabric Node SDK在Hyperledger结构网络(云上设置)上实例化一个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 Node SDK版本:1.4.4

最新的标签不再可用。您必须使用特定的
标记
。下面是
fabric maintainers
组中的
dave
注释片段

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```

链接:

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

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

为您想要的任何版本执行docker pull的
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 ccenv的
最新标签不再存在

该值在
core.yaml
文件中定义为
chaincode.builder
,可由环境变量
core\u chaincode\u builder
覆盖

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

CORE_CHAINCODE_BUILDER: hyperledger/fabric-ccenv:2.1
请参见如何在舵图中使用它的示例