Error when trying to bring up the test network
Asked Answered
R

5

5

I trying to follow tutorials and develope on Ubuntu. Then get an error when comes to "Bring up the test network" part. I successfully run the following command to print the script help text of the test network.

./network.sh -h

When I want to run the next command to bring up the network

./network.sh up

I get the message as follow

Starting nodes with CLI timeout of '5' tries and CLI delay of '3' seconds and using database 'leveldb' with crypto from 'cryptogen'

ERROR! Peer binary and configuration files not found..

May somebody tells me what's happened? Kindly helps.

Reverie answered 20/1, 2020 at 13:24 Comment(6)
You have no binaries and crypto folders.Marybellemarybeth
Did you go through prerequisite section of hyperledger documentation? You need to install fabric binaries before using test network.Boat
Follow this link- hyperledger-fabric.readthedocs.io/en/latest/install.htmlBoat
Thank you for answers. I just find that I made a mistake when setting the environment variable. And the problem has been solved.Reverie
And I really only clone the hyperledger/fabric-samples repository, and no install binaries and crypto folders. I will go through hyperledger documentation more carefully.Reverie
what was missing for me is running ./install-fabric.sh binaryScarper
M
2

Be sure to use

./network.sh up

from the test network folder and that test network folder is contained in fabric samples, because it could use binaries from different directories contained inside fabric samples and moving it could cause your error.

Also try to set this environment variable

FABRIC_CFG_PATH=$PWD

to force Fabric to be launched in your test network folder

Marybellemarybeth answered 20/1, 2020 at 15:46 Comment(8)
I guess there is no generate mode in network.sh, at least for hyperledger 2.0.Boat
Ok, I see the point. You are in the wrong folder. If this is your very first run of Hyperledger, don't use the "Test network" example, but "First Network" instead. This one: github.com/hyperledger/fabric-samples/tree/master/first-network . Here you can run generate and next up command. Test network is a little bit different example and if you have no knowledge about HL you are not good to go with it.Marybellemarybeth
According to hyperledger documentation, they are soon going to get rid of first network and test network has to be used. Test network is not that difficult if one knows how to do troubleshooting. Even I started with HL 2 weeks ago and I could run test-network in this week. It gives some problem but it can be taken care of.Boat
Ok, in this case let me help you with test network. You are probably doing something wrong with file paths. Try with FABRIC_CFG_PATH=$PWD in your terminal, I think that you are running the command but docker containers are unable to find configuration files. Be sure to download fabric samples as is and launch the script from the correct folder. Do not move the folder outside fabric samples, there is probable some error in file paths. Also be sure to read this hyperledger-fabric.readthedocs.io/en/latest/install.htmlMarybellemarybeth
I guess you are mistaking me for the person who has asked question.. I am just a commentor.. not the one who asked the question..Boat
There is no generate mode in network.sh script. And there is no network.sh script in first network. If your claims are correct, please provide the link that explains generate mode or make correction in the answer. :)Boat
Let me clarify, in my last message I don't mean to launch generate scripts, I am saying to launch again the network up command with the environment variable I suggested and to be sure that he didn't move the test network folder outside the fabric samples, because probably it uses binaries and other materials from other folders, which could cause the error.Marybellemarybeth
Anyways I just changed the answer with what is for me the correct one. Thanks Pallavi !Marybellemarybeth
E
3

I had the same issue, looks like you need to fetch system specific binaries: https://hyperledger-fabric.readthedocs.io/en/release-2.2/test_network.html

I ran the curl command in the root dir without specifying the versions.

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

Make sure you add the ./bin to .gitignore

Escamilla answered 19/2, 2022 at 7:0 Comment(0)
M
2

Be sure to use

./network.sh up

from the test network folder and that test network folder is contained in fabric samples, because it could use binaries from different directories contained inside fabric samples and moving it could cause your error.

Also try to set this environment variable

FABRIC_CFG_PATH=$PWD

to force Fabric to be launched in your test network folder

Marybellemarybeth answered 20/1, 2020 at 15:46 Comment(8)
I guess there is no generate mode in network.sh, at least for hyperledger 2.0.Boat
Ok, I see the point. You are in the wrong folder. If this is your very first run of Hyperledger, don't use the "Test network" example, but "First Network" instead. This one: github.com/hyperledger/fabric-samples/tree/master/first-network . Here you can run generate and next up command. Test network is a little bit different example and if you have no knowledge about HL you are not good to go with it.Marybellemarybeth
According to hyperledger documentation, they are soon going to get rid of first network and test network has to be used. Test network is not that difficult if one knows how to do troubleshooting. Even I started with HL 2 weeks ago and I could run test-network in this week. It gives some problem but it can be taken care of.Boat
Ok, in this case let me help you with test network. You are probably doing something wrong with file paths. Try with FABRIC_CFG_PATH=$PWD in your terminal, I think that you are running the command but docker containers are unable to find configuration files. Be sure to download fabric samples as is and launch the script from the correct folder. Do not move the folder outside fabric samples, there is probable some error in file paths. Also be sure to read this hyperledger-fabric.readthedocs.io/en/latest/install.htmlMarybellemarybeth
I guess you are mistaking me for the person who has asked question.. I am just a commentor.. not the one who asked the question..Boat
There is no generate mode in network.sh script. And there is no network.sh script in first network. If your claims are correct, please provide the link that explains generate mode or make correction in the answer. :)Boat
Let me clarify, in my last message I don't mean to launch generate scripts, I am saying to launch again the network up command with the environment variable I suggested and to be sure that he didn't move the test network folder outside the fabric samples, because probably it uses binaries and other materials from other folders, which could cause the error.Marybellemarybeth
Anyways I just changed the answer with what is for me the correct one. Thanks Pallavi !Marybellemarybeth
L
1

first bring down the network to clean up

cd test-network
./network.sh down

start the network agian

./network.sh up
Laggard answered 30/6, 2021 at 7:35 Comment(1)
In my own case, using WSL, from within the test-network directory, I ran the command './network.sh down ' to remove any containers or artifacts from any previous runs, and then ran the ./network.sh up' to bring the network up accordingly. hyperledger-fabric.readthedocs.io/en/latest/test_network.htmlUnicycle
B
0

Before you can deploy the test network, you need to follow the instructions to Install the Samples, Binaries and Docker Images in the Hyperledger Fabric documentation.

Binetta answered 19/1, 2022 at 4:10 Comment(0)
L
0

First make sure you are outside of test-network folder. then run the below command. If you are still facing error, you probably are in wrong directory. This command will automatically install the required binaries.

curl -sSLO https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh && chmod +x install-fabric.sh
Lifesaver answered 14/2 at 9:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.