Welcome to the Linux Foundation Forum!

Lab 4.1 chaincode deployment error

Hello, I am facing an issue when trying to perform Lab 4.1

When I try to run this command:

peer lifecycle chaincode package simple_chaincode.tar.gz --path ../lfd272/chaincodes/simple_chaincode --lang node --label simple_chaincode_1.0

I get this error:

2021-06-20 13:54:58.397 IST [chaincode.platform.util] func1 -> ERRO 001 Visit ../lfd272/chaincodes/simple_chaincode failed: lstat ../lfd272/chaincodes/simple_chaincode: no such file or directory
2021-06-20 13:54:58.397 IST [chaincode.platform.util] WriteFolderToTarPackage -> INFO 002 Error walking rootDirectory: lstat ../lfd272/chaincodes/simple_chaincode: no such file or directory
2021-06-20 13:54:58.397 IST [chaincode.platform.node] GetDeploymentPayload -> ERRO 003 Error writing folder to tar package lstat ../lfd272/chaincodes/simple_chaincode: no such file or directory
Error: error getting chaincode bytes: Error writing Chaincode package contents: lstat ../lfd272/chaincodes/simple_chaincode: no such file or 

After installing required software dependencies, I have completed these steps:

cd $HOME/go/src/github.com/hyperledger
curl -sSL http://bit.ly/2ysbOFE | bash -s -- 2.2.2 1.4.9
cd fabric-samples
git checkout v2.2.2

cd ..
git clone https://github.com/hyperledger/fabric
cd fabric
git checkout release-2.2

cd ~/go/src/github.com/hyperledger/fabric-samples/test-network/
./network.sh up createChannel -ca -s couchdb

Open a new terminal and:

cd $HOME/go/src/github.com/hyperledger/fabric-samples/test-network
export CORE_PEER_TLS_ENABLED=true
export CORE_PEER_LOCALMSPID="Org1MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp
export CORE_PEER_ADDRESS=localhost:7051
export PATH=${PWD}/../bin:$PATH
export FABRIC_CFG_PATH=$PWD/../config/

Open another new terminal and:

cd $HOME/go/src/github.com/hyperledger/fabric-samples/test-network
export CORE_PEER_TLS_ENABLED=true
export CORE_PEER_LOCALMSPID="Org2MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org2.example.com/users/[email protected]/msp
export CORE_PEER_ADDRESS=localhost:9051
export PATH=${PWD}/../bin:$PATH
export FABRIC_CFG_PATH=$PWD/../config/

Then on the next step, I get the error that I described in the beginning.

Categories

Upcoming Training