tujigogo
tujigogo

Reputation: 21

Hyperledger-fabric2.0 run first-network failure. failed to read chaincode package at '.tar.gz'

environment

CentOS7, go version go1.13.8 linux/amd64 Docker version 19.03.6

Hyperledger-fabric 2.0

My steps

1.download fabric-samples 2.run byfn.sh generate in /fabric-sample/first-network/ this step is ok 3.run byfn.sh up then i got failure

Failure

===================== Chaincode is packaged on peer0.org1 =====================

Installing chaincode on peer0.org1... + peer lifecycle chaincode install .tar.gz + res=1 + set +x Error: failed to read chaincode package at '.tar.gz': open .tar.gz: no such file or directory !!!!!!!!!!!!!!! Chaincode installation on peer0.org1 has failed !!!!!!!!!!!!!!!! ========= ERROR !!! FAILED to execute End-2-End Scenario ===========

I tried

1.

i tried use peer lifecycle chaincode to tar chaincode , that network should be run, and docker container should be there .. so i can't use peer lifecycle to tar

Upvotes: 2

Views: 2474

Answers (4)

ysong4
ysong4

Reputation: 191

Well, they seems to fix the problem. You need to do a git pull on root directory of fabric-sample.

My current commit number is e5b898c08d86e35bd80db8024a0c3eed6a9abcb2 and I am using master branch.

Upvotes: 0

Arun Hossamani
Arun Hossamani

Reputation: 69

  1. It's not you, there was a regression in the fabric-samples code, if you want to keep going right now you can do a git reset --hard e204ebb3b2749b72621fa05fc753f4bea1ff7976 to drop the bad change
  2. Long story short, a chaincode label variable was added, but not passed around accordingly to the correct functions.

Upvotes: 0

The Yarmowich
The Yarmowich

Reputation: 11

I was getting this same issue too! This appears to be an issue in Hyperledger 1.4.5, to fix downgrade to v1.4.4

Here's how I solved it.

  1. In your first-network directory shut down the ledger

    ./byfn.sh down

  2. Remove the fabric-samples directory

    rm -r <download location>/fabric-samples

  3. Install version 1.4.4: curl -sSL

    https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s -- 1.4.6 1.4.6 0.4.18

  4. export the /bin to your PATH

    export PATH=<path to download location>/bin:$PATH

  5. cd fabric-samples/first-networks

  6. ./byfn.sh generate

  7. either ./byfn.sh up, ./byfn.sh up -l node, or what I used ./byfn.sh up -l java

Upvotes: 1

Shubham Jaiswal
Shubham Jaiswal

Reputation: 610

The issue what I see here is your chaincode package file (tar.gz) is not found.That means the chaincode package command is failing everytime.

Have you checked inside the docker "chaincodename.tar.gz" is built every-time you run the script.If not then,

First check the tools are available in the "bin" folder and path is exported as well. You can try packaging and installing the chaincode steps manually to know more in detail what is causing it to fail.

Upvotes: 0

Related Questions