【问题标题】:Instantiation of Chaincode using Fabric Node SDK gives API error (404): manifest for hyperledger/fabric-ccenv:latest not found使用 Fabric Node SDK 实例化 Chaincode 会导致 API 错误(404):hyperledger/fabric-ccenv 的清单:未找到最新的
【发布时间】:2020-11-01 17:53:07
【问题描述】:

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

【问题讨论】:

    标签: hyperledger-fabric hyperledger-chaincode hyperledger-fabric-sdk-js


    【解决方案1】:

    latest 标签不再可用。你必须使用特定的tag。下面是davefabric-maintainers群里评论的sn-p。

    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

    【讨论】:

      【解决方案2】:

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

      这个特殊的 [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 for latest image 因为带有标签的图像已经在您的机器上可用。

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

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

      【讨论】:

        【解决方案3】:

        正如上面的 alpha 所述,hyperledger/fabric-ccenvlatest 标记不再存在。

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

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

        CORE_CHAINCODE_BUILDER: hyperledger/fabric-ccenv:2.1
        

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

        【讨论】:

          猜你喜欢
          • 2017-10-05
          • 1970-01-01
          • 1970-01-01
          • 2018-04-07
          • 1970-01-01
          • 1970-01-01
          • 2018-04-21
          • 2021-07-27
          • 1970-01-01
          相关资源
          最近更新 更多