HyperledgerHandsOn/trade-finance-logistics

Failed to generate orderer genesis block

Sumanarayan opened this issue · 3 comments

While proceeding with the mentioned step: Build Channel and Crypto Artifacts, and Network Structure Using Docker Containers,the below error is raised on executing the below command.

Command:::: ./trade.sh generate -c tradechannel

Error::::::
hp@hp-HP-Notebook:~/go/src/github.com/hyperledger/fabric/network$ ./trade.sh generate -c tradechannel
Generating certs and genesis block with channel 'tradechannel'
Continue? [Y/n] Y
proceeding ...
/usr/local/bin/cryptogen

##########################################################

Generate certificates using cryptogen tool

##########################################################

  • cryptogen generate --config=./crypto-config.yaml
    exporterorg.trade.com
    importerorg.trade.com
    carrierorg.trade.com
    regulatororg.trade.com
  • res=0
  • set +x

/usr/local/bin/configtxgen
###########################################################
######### Generating Orderer Genesis block ##############
###########################################################

  • configtxgen -profile FourOrgsTradeOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
    2019-02-04 19:26:14.133 IST [common.tools.configtxgen] main -> WARN 001 Omitting the channel ID for configtxgen for output operations is deprecated. Explicitly passing the channel ID will be required in the future, defaulting to 'testchainid'.
    2019-02-04 19:26:14.133 IST [common.tools.configtxgen] main -> INFO 002 Loading configuration
    2019-02-04 19:26:14.147 IST [common.tools.configtxgen.localconfig] Load -> PANI 003 Error reading configuration: While parsing config: yaml: unknown anchor 'ChannelCapabilities' referenced
    2019-02-04 19:26:14.147 IST [common.tools.configtxgen] func1 -> PANI 004 Error reading configuration: While parsing config: yaml: unknown anchor 'ChannelCapabilities' referenced
    panic: Error reading configuration: While parsing config: yaml: unknown anchor 'ChannelCapabilities' referenced [recovered]
    panic: Error reading configuration: While parsing config: yaml: unknown anchor 'ChannelCapabilities' referenced

goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc42011f970, 0x0, 0x0, 0x0)
/home/hp/go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x4f4
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc4200b8240, 0xc420393804, 0xc420178460, 0x69, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/hp/go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xf6
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(0xc4200b8240, 0xc420178460, 0x69, 0x0, 0x0, 0x0)
/home/hp/go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x79
github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc4200b8248, 0xc420393918, 0x1, 0x1)
/home/hp/go/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x75
main.main.func1()
/home/hp/go/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:250 +0x1a7
panic(0xd1b520, 0xc420360f20)
/usr/lib/go-1.10/src/runtime/panic.go:502 +0x229
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc42011f970, 0x0, 0x0, 0x0)
/home/hp/go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x4f4
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc4200b8220, 0xc420393c04, 0xc420178310, 0x69, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/hp/go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xf6
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(0xc4200b8220, 0xc420178310, 0x69, 0x0, 0x0, 0x0)
/home/hp/go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x79
github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc4200b8228, 0xc420393da8, 0x2, 0x2)
/home/hp/go/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x75
github.com/hyperledger/fabric/common/tools/configtxgen/localconfig.Load(0x7fff8dc0c1af, 0x1b, 0x0, 0x0, 0x0, 0x1)
/home/hp/go/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:275 +0x441
main.main()
/home/hp/go/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:261 +0xb3c

  • res=2
  • set +x
    Failed to generate orderer genesis block...

As is mentioned in the README page, the master branch of this code works with Hyperledger Fabric v1.1 (release-1.1 branch.) So please clone and build that version to avoid the above error.

If you want to use Fabric v1.2, use the release-1.2 branch of this code. It may also work with higher versions of Fabric, but that's not been tested yet.

As is mentioned in the README page, the master branch of this code works with Hyperledger Fabric v1.1 (release-1.1 branch.) So please clone and build that version to avoid the above error.

If you want to use Fabric v1.2, use the release-1.2 branch of this code. It may also work with higher versions of Fabric, but that's not been tested yet.

Reply::::::::: To VRamakrishna
Sir,
As you mentioned that we need to use release-1.1, we are doing with the release-1.1. Still it araises the same problem "Failed to generate orderer genesis block".

Did you rebuild configtxgen and cryptogen in the release-1.1 clone of Fabric? And make sure that those executables were in the system path, and not the older ones?