4

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.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
JasonLee
  • 53
  • 1
  • 5
  • 1
    You have no binaries and crypto folders. – Riki95 Jan 20 '20 at 15:45
  • 1
    Did you go through prerequisite section of hyperledger documentation? You need to install fabric binaries before using test network. – Pallavi Jan 21 '20 at 09:17
  • Follow this link- https://hyperledger-fabric.readthedocs.io/en/latest/install.html – Pallavi Jan 21 '20 at 09:19
  • Thank you for answers. I just find that I made a mistake when setting the environment variable. And the problem has been solved. – JasonLee Feb 03 '20 at 01:47
  • 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. – JasonLee Feb 03 '20 at 02:05
  • what was missing for me is running `./install-fabric.sh binary` – samasoulé Nov 21 '22 at 10:19

4 Answers4

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

Murty
  • 31
  • 5
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

Riki95
  • 706
  • 1
  • 7
  • 16
  • I guess there is no generate mode in network.sh, at least for hyperledger 2.0. – Pallavi Jan 21 '20 at 09:15
  • 1
    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: https://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. – Riki95 Jan 21 '20 at 10:13
  • 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. – Pallavi Jan 21 '20 at 10:16
  • 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 https://hyperledger-fabric.readthedocs.io/en/latest/install.html – Riki95 Jan 21 '20 at 13:23
  • 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.. – Pallavi Jan 21 '20 at 13:26
  • 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. :) – Pallavi Jan 21 '20 at 13:31
  • 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. – Riki95 Jan 21 '20 at 16:28
  • 1
    Anyways I just changed the answer with what is for me the correct one. Thanks Pallavi ! – Riki95 Jan 21 '20 at 16:30
0

first bring down the network to clean up

cd test-network
./network.sh down

start the network agian

./network.sh up
milon27
  • 11
  • 2
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.

suiwenfeng
  • 1,865
  • 1
  • 25
  • 32