简体   繁体   中英

Hyperledger Fabric- Failed to generate orderer genesis block

  • By running ./byfn.sh generate command I am getting error mentioned below:

     INHYKPMAC01-MacBook-Pro:first-network prakriti$ ./byfn.sh generate -c PDM Generating certs and genesis block for channel 'PDM' with CLI timeout of '10' seconds and CLI delay of '3' seconds Continue? [Y/n] y proceeding ... /Users/prakriti/Hyperledger/fabric-samples/first-network/../bin/cryptogen ########################################################## ##### Generate certificates using cryptogen tool ######### ########################################################## + cryptogen generate --config=./crypto-config.yaml org1.example.com org2.example.com + res=0 + set +x /Users/prakriti/Hyperledger/fabric-samples/first-network/../bin/configtxgen ########################################################## ######### Generating Orderer Genesis block ############## ########################################################## CONSENSUS_TYPE=solo + '[' solo == solo ']' + configtxgen -profile TwoOrgsOrdererGenesis -channelID byfn-sys-channel -outputBlock ./channel-artifacts/genesis.block 2019-03-04 13:29:31.572 IST [common/configtx/tool] main -> INFO 001 Loading configuration 2019-03-04 13:29:31.588 IST [common/configtx/tool/localconfig] Load -> CRIT 002 Error reading

    configuration: While parsing config: yaml: line 311: did not find expected key + res=1 + set +x Failed to generate orderer genesis block...

Are you working with a "customised" configtx.yaml file?

Either there is some syntax error in the file or a formatting error in the file. Exact formatting in yaml is important.

If you are working with the standard file - it could be corrupted, so download a new version.

BTW - channel names cannot contain UPPERCASE characters, so your channel name PDM is invalid. (I haven't tested the scenario of generating a genesis block using uppercase but sooner or later it will cause a problem.)

EDIT

I would also check the version of configtxgen to make sure it is the right 1.4.0 version ../bin/configtxgen -version (not an old version or a new v2.0 beta version)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM