创建Fabric创世区块,出错Failed to generate orderer genesis block

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

Generate certificates using cryptogen tool

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

  • cryptogen generate --config=./crypto-config.yaml
    org1.example.com
    org2.example.com
  • res=0
  • set +x

Generate CCP files for Org1 and Org2
/home/zl/go/bin/configtxgen
##########################################################
######### Generating Orderer Genesis block ##############
##########################################################
2020-02-28 20:06:57.468 PST [common/configtx/tool] main -> INFO 001 Loading configuration
2020-02-28 20:06:57.510 PST [common/configtx/tool/localconfig] Load -> CRIT 002 Error unmarshaling config into struct: 17 error(s) decoding:

  • ‘’ has invalid keys: capabilities, channel
  • ‘Application’ has invalid keys: Capabilities, Policies
  • ‘Orderer’ has invalid keys: Policies
  • ‘Organizations[0]’ has invalid keys: Policies
  • ‘Organizations[1]’ has invalid keys: Policies
  • ‘Organizations[2]’ has invalid keys: Policies
  • ‘Profiles[SampleMultiNodeEtcdRaft]’ has invalid keys: Capabilities, Policies
  • ‘Profiles[SampleMultiNodeEtcdRaft].Application’ has invalid keys: Capabilities, Policies
  • ‘Profiles[SampleMultiNodeEtcdRaft].Application.Organizations[0]’ has invalid keys: Policies
  • ‘Profiles[SampleMultiNodeEtcdRaft].Consortiums[SampleConsortium].Organizations[0]’ has invalid keys: Policies
  • ‘Profiles[SampleMultiNodeEtcdRaft].Consortiums[SampleConsortium].Organizations[1]’ has invalid keys: Policies
  • ‘Profiles[SampleMultiNodeEtcdRaft].Orderer’ has invalid keys: Capabilities, EtcdRaft, Policies
  • ‘Profiles[SampleMultiNodeEtcdRaft].Orderer.Organizations[0]’ has invalid keys: Policies
  • ‘Profiles[TwoOrgsChannel]’ has invalid keys: Capabilities, Policies
  • ‘Profiles[TwoOrgsChannel].Application’ has invalid keys: Capabilities, Policies
  • ‘Profiles[TwoOrgsChannel].Application.Organizations[0]’ has invalid keys: Policies
  • ‘Profiles[TwoOrgsChannel].Application.Organizations[1]’ has invalid keys: Policies
    Failed to generate orderer genesis block…

创建创世区块遇到以上错误,经个人测试是版本不同导致
解决办法:我的项目目录如下:
创建Fabric创世区块,出错Failed to generate orderer genesis block_第1张图片
在fabric 和fabric-sample中分别切换相同的版本号即可,
我使用的是1.0版本,分别在这两个目录下运行以下代码:
git checkout release-1.0

完成重新生成区块即可

你可能感兴趣的:(创建Fabric创世区块,出错Failed to generate orderer genesis block)