"fabric-nodeenv:latest not found" Error

Q

How to resolve the "hyperledger/fabric-nodeenv:latest not found" error?

✍: FYIcenter.com

A

Based on discussions on the Internet, there is a something wrong in the Docker image repository for "hyperledger/fabric-nodeenv:latest" image.

When you try to instantiate chaincode a Hyperledger Fabric network channel, a docker container needs to be created from a specific version of hyperledger/fabric-nodeenv image. If your Hyperledger Fabric network channel is configured to use the "latest" version, you will get the following error:

Error: could not assemble transaction, err proposal response was not 
successful, error code 500, msg error starting container: error starting 
container: Failed to generate platform-specific docker build: Failed to 
pull hyperledger/fabric-nodeenv:latest: API error (404): manifest for 
hyperledger/fabric-nodeenv:latest not found

One way to avoid the problem is to configure the Hyperledger Fabric network to use specific version of Docker images.

1. Modify ../basic-net/docker-compose.yml to use amd64-1.4.0 image version for all containers, except for couchdb:

$ cd ~/hyperledger-binaries/fabric-samples/fabcar

$ vi ../basic-net/docker-compose.yml

# Copyright IBM Corp All Rights Reserved
version: '2'

networks:
  basic:

services:
  ca.example.com:
    container_name: ca.example.com
    image: hyperledger/fabric-ca:amd64-1.4.0
    ...
    
  orderer.example.com:
    container_name: orderer.example.com
    image: hyperledger/fabric-orderer:amd64-1.4.0
    ...

  peer0.org1.example.com:
    container_name: peer0.org1.example.com
    image: hyperledger/fabric-peer:amd64-1.4.0
    ...

  couchdb:
    container_name: couchdb
    image: hyperledger/fabric-couchdb
    ...

  cli:
    container_name: cli
    image: hyperledger/fabric-tools:amd64-1.4.0
    ...

2. Remove all container images manually, since ./teardown.sh is not working:

$ docker rmi hyperledger/fabric-ca:latest
$ docker rmi hyperledger/fabric-orderer:latest
$ docker rmi hyperledger/fabric-peer:latest
$ docker rmi hyperledger/fabric-couchdb:latest
$ docker rmi hyperledger/fabric-tools:latest

3. Re-run ./startFabric.sh to download, deploy and start it again:

$ ./startFabric.sh

...
[chaincodeCmd] chaincodeInvokeOrQuery -> INFO 001 Chaincode invoke successful. result: status:200
Total setup execution time : 157 secs ...

Next, use the FabCar applications to interact with the deployed FabCar contract.
The FabCar applications are available in multiple programming languages.
Follow the instructions for the programming language of your choice:

JavaScript:
  Start by changing into the "javascript" directory:
    cd javascript

  Next, install all required packages:
    npm install

  Then run the following applications to enroll the admin user, and register a new user
  called user1 which will be used by the other applications to interact with the deployed
  FabCar contract:
    node enrollAdmin
    node registerUser

  You can run the invoke application as follows. By default, the invoke application will
  create a new car, but you can update the application to submit other transactions:
    node invoke

  You can run the query application as follows. By default, the query application will
  return all cars, but you can update the application to evaluate other transactions:
    node query

...

As you can see, the "hyperledger/fabric-nodeenv:latest not found" error is not showing up anymore.

 

fabcar.go - The "fabcar" Chaincode

Reinstall Chaincode on WYFA Network

WYFA (Writing Your First Application)

⇑⇑ Hyperledger Tutorials

2020-02-29, 1597🔥, 0💬