4

I am trying to instantiate a Golang chaincode on my Hyperledger Fabric network (setup on cloud) using Fabric Node SDK. However, I am facing the following error while performing the same:

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

The stack trace for the same is:

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)

I also tried to directly pull the image hyperledger/fabric-ccenv in my local environment but getting a similar error there as well:

Command:

docker pull hyperledger/fabric-ccenv

Error:

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

Fabric Peer Version: 1.4.4 Fabric Node SDK Version: 1.4.4

Chintan Rajvir
  • 514
  • 4
  • 15

3 Answers3

8

As mentioned by alpha above, latest tag for hyperledger/fabric-ccenv does not exist anymore.

The value is defined as chaincode.builder in core.yaml file and can be overridden by the environment variable CORE_CHAINCODE_BUILDER.

So, the correct approach to solve the issue is passing the environment variable to peer with preferred ccenv version. For example:

CORE_CHAINCODE_BUILDER: hyperledger/fabric-ccenv:2.1

See this commit as an example of how to use it in a Helm chart.

r a f t
  • 181
  • 1
  • 5
4

latest tag isn't available anymore. you have to use specific tag. Below is the snippet of dave comment infabric-maintainers group.

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

Dharman
  • 21,838
  • 18
  • 57
  • 107
metadata
  • 918
  • 6
  • 20
4

I was trying to install/instantiate a year old chaincode and obviously I haven't updated any dependencies so I also ran into this issue.

This particular [hyperledger/fabric-ccenv:latest] docker pull is being done by one of dependencies and following is the way around that.

Do a docker pull of fabric-ccenv for whatever version you want.

docker pull hyperledger/fabric-ccenv:2.1

And then tag it as latest,

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

Now when you try to install the chaincode, the docker pull for latest image wont happen as the image with the tag is already available on your machine.

The above two commands is something you can add in your start script.

Thanks to @alpha for mentioning that the latest tag has been taken down.

gsb22
  • 1,566
  • 6
  • 16