Could not find profile: TwoOrgsOrdererGenesis.

**

问题:

**当执行../bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block -channelID channel00时出现错误如下:
错误提示:Could not find profile: TwoOrgsOrdererGenesis. Please make sure that FABRIC_CFG_PATH or -configPath is set to a path which contains configtx.yaml with the specified profile在这里插入图片描述
问题分析:根据出现的提示,做一下分析判断:

  • 判断文件configtx.yaml是否存在。存在
  • 判断FABRIC_CFG_PATH是否正确。echo $FABRIC_CFG_PATH 正确在这里插入图片描述
  • 可以判断问题是出在configtx.yaml中,打开这个文件,找到profile,看里面是否存在TwoOrgsOrdererGenesis
    在这里插入图片描述
    发现TwoOrgsOrdererGenesis并不存在,所以可以断定是这个文件中出了问题。

网上找到的关于这个文件是这样的:

Profiles:
    TwoOrgsOrdererGenesis:
        Capabilities:
            <<: *ChannelCapabilities
        Orderer:
            <<: *OrdererDefaults
            Organizations:
                - *OrdererOrg
            Capabilities:
                <<: *OrdererCapabilities
        Consortiums:
            SampleConsortium:
                Organizations:
                    - *Org1
                    - *Org2
    TwoOrgsChannel:
        Consortium: SampleConsortium
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *Org1
                - *Org2
            Capabilities:
                <<: *ApplicationCapabilities

我使用的是最新版本的fabric
所以可能是因为最新版本做了一些改动,导致这个文件发生了变化。
我尝试用以下命令执行:../bin/configtxgen -profile SampleMultiNodeEtcdRaft -outputBlock ./channel-artifacts/genesis.block -channelID channel00

成功执行:在这里插入图片描述

原创文章 5 获赞 3 访问量 605

猜你喜欢

转载自blog.csdn.net/i_want_study/article/details/105854687
今日推荐