PacktPublishing / Blockchain-By-Example

Blockchain By Example published by Packt
MIT License
79 stars 59 forks source link

Chapter 10 : Supply Chain on Hyperledger #32

Open tladi-nkhi opened 1 year ago

tladi-nkhi commented 1 year ago

Good day

Kindly assist. I am just starting to learn about Hyperledger Fabric and i would like to run the Chapter 10 example (Supply Chain on Hyperledger) . I have set up the environment and installed the required prerequisites (Go , NPM , Git , Docker , Curl..)

I downloaded the BlockChain-By-Example-master.zip code bundle from git to my ubuntu (20.04) machine. I am at the point where i want to start the Fabric Channer and Genesis Block.

In the food-supply-chain folder i executed the code to start the genesis block configtxgen -profile FSCOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block

and i am getting this error

2023-09-29 07:20:37.441 UTC [common.tools.configtxgen] main -> FATA 001 Missing channelID, please specify it with '-channelID'

I then ran the line to exeport the channel name so that i can specify it in the create genesis block code

export CHANNEL_NAME="fscchannel"

Export command ran successfully and then i specified the channelId in the genesis block create command below

configtxgen -profile FSCOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block -channelID $CHANNEL_NAME

But this also created a different error message .

2023-09-29 07:38:57.216 UTC [common.tools.configtxgen] main -> FATA 004 Error on outputBlock: could not create bootstrapper: could not create channel group: error adding policies to channel group: no policies defined

So this is my request for assistance is there something else that i should have done prior to starting the genesis block. Because all i have done so far is to install all the prerequisites (Go , curl , Docker , git , npm ...) and i installed the Hyperledger Fabric using the curl command curl -sSL https://bit.ly/2ysbOFE | sudo bash -s -- 2.2.13 1.5.6 i didnt use the hyperledger install command specified in the book curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/release-1.2/scripts/bootstrap.sh | bash , i am not sure if this can also be the reason for the error.

I would appreciate your assistance.

Best regards

Tladi Nkhi

tladi-nkhi commented 1 year ago

Hi , I meant to say that i am the point where i want to start the Fabric Channel and Genesis Block.

Thanks.

bellaj commented 1 year ago

@tladi-nkhi I would recomend you to use a newer hyperledger fabric guide (the book covered V1 which is no longer maintained).

tladi-nkhi commented 1 year ago

Ye

@tladi-nkhi I would recomend you to use a newer hyperledger fabric guide (the book covered V1 which is no longer maintained).

Hi @bellaj , i will look for upated examples i can use.

Thank you for your assistance.