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

成功執行:在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章