在HyperLedger fabric 2.5中创建网络通道出现`Attempted to include member Org1 which is not in the consortium`问题?

新手上路,请多包涵

在HyperLedger fabric 2.5 中创建网络通道时,出现Error: got unexpected status: BAD_REQUEST -- Attempted to include member Org1MSP which is not in the consortium的问题,
我的configtx.yaml 文件中consortiums 中包含了org1、org2两个节点,一下是我的configtx.yaml文件

Organizations:
  - &OrdererOrg
    Name: OrdererOrg
    ID: OrdererMSP
    MSPDir: ./org0/msp
    Policies: # 定义策略
      Readers: # 读取者策略
        Type: Signature
        Rule: "OR('OrdererMSP.member')"
      Writers: # 写入者策略
        Type: Signature
        Rule: "OR('OrdererMSP.member')"
      Admins: # 管理员策略
        Type: Signature
        Rule: "OR('OrdererMSP.admin')"
    AdminPrincipal: Role.ADMIN # 声明管理员角色

  - &Org1
    Name: Org1MSP
    ID: Org1MSP
    MSPDir: ./org1/msp
    Policies: # 定义策略
      Readers: # 读取者策略
        Type: Signature
        Rule: "OR('Org1MSP.admin', 'Org1MSP.peer', 'Org1MSP.client')"
      Writers: # 写入者策略
        Type: Signature
        Rule: "OR('Org1MSP.admin', 'Org1MSP.client')"
      Admins: # 管理员策略
        Type: Signature
        Rule: "OR('Org1MSP.admin')"
    AdminPrincipal: Role.ADMIN # 声明管理员角色
    AnchorPeers: # 锚定节点配置
      - Host: peer1-org1
        Port: 7051

  - &Org2
    Name: Org2MSP
    ID: Org2MSP
    MSPDir: ./org2/msp
    Policies: # 定义策略
      Readers: # 读取者策略
        Type: Signature
        Rule: "OR('Org2MSP.admin', 'Org2MSP.peer', 'Org2MSP.client')"
      Writers: # 写入者策略
        Type: Signature
        Rule: "OR('Org2MSP.admin', 'Org2MSP.client')"
      Admins: # 管理员策略
        Type: Signature
        Rule: "OR('Org2MSP.admin')"
    AdminPrincipal: Role.ADMIN # 声明管理员角色
    AnchorPeers: # 锚定节点配置
      - Host: peer1-org2
        Port: 9051

Capabilities: # 定义能力
  Channel: &ChannelCapabilities
    V2_0: true
  Orderer: &OrdererCapabilities
    V2_0: true
  Application: &ApplicationCapabilities
    V2_5: true

Application: &ApplicationDefaults
  ACLs: &ACLsDefault
    # 系统中各种资源的策略提供默认值
    _lifecycle/CommitChaincodeDefinition: /Channel/Application/Writers
    _lifecycle/QueryChaincodeDefinition: /Channel/Application/Readers
    _lifecycle/QueryNamespaceDefinitions: /Channel/Application/Readers
    qscc/BlockByNumber: /Channel/Application/Readers
    qscc/Blocks: /Channel/Application/Readers
    qscc/ChainInfo: /Channel/Application/Readers
    qscc/GetBlockByNumber: /Channel/Application/Readers
    qscc/GetChainInfo: /Channel/Application/Readers
    qscc/GetPartialBlock: /Channel/Application/Readers
    qscc/TransactionByID: /Channel/Application/Readers
    qscc/TxByID: /Channel/Application/Readers
    cscc/GetConfigBlock: /Channel/Application/Readers
    cscc/GetConfigTree: /Channel/Application/Readers
    cscc/GetChannels: /Channel/Application/Readers
    event/Block: /Channel/Application/Readers
    event/FilteredBlock: /Channel/Application/Readers

  Organizations:

  Policies: # 定义策略
    Readers: # 读取者策略
      Type: ImplicitMeta
      Rule: "ANY Readers"
    Writers: # 写入者策略
      Type: ImplicitMeta
      Rule: "ANY Writers"
    Admins: # 管理员策略
      Type: ImplicitMeta
      Rule: "MAJORITY Admins"

  Capabilities:
    <<: *ApplicationCapabilities

Orderer: &OrdererDefaults
  OrdererType: solo

  Addresses:
    - orderer-org0:7050
  BatchTimeout: 2s
  BatchSize:
    MaxMessageCount: 100
    AbsoluteMaxBytes: 99 MB
    PreferredMaxBytes: 2 MB
  Organizations:
    - *OrdererOrg
  Policies: # 定义策略
    Readers: # 读取者策略
      Type: ImplicitMeta
      Rule: "ANY Readers"
    Writers: # 写入者策略
      Type: ImplicitMeta
      Rule: "ANY Writers"
    Admins: # 管理员策略
      Type: ImplicitMeta
      Rule: "MAJORITY Admins"
    # BlockValidation指定了必须包含在区块中的签名
    # 从orderer节点发来的区块,peer节点验证它。
    BlockValidation:
      Type: ImplicitMeta
      Rule: "ANY Writers"

Channel: &ChannelDefaults
  Policies: # 定义策略
    # 谁可以调用'Deliver' API
    Readers:
      Type: ImplicitMeta
      Rule: "ANY Readers"
    # 谁可以调用'Broadcast' API
    Writers:
      Type: ImplicitMeta
      Rule: "ANY Writers"
    # 默认情况下,谁可以修改此配置级别的元素
    Admins:
      Type: ImplicitMeta
      Rule: "MAJORITY Admins"
  Capabilities:
    <<: *ChannelCapabilities

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

想知道为什么会出现这样的问题
现在把configtx.yaml改了一下就没有上面那个问题了,但是现在又出现了一个error validating channel creation transaction for new channel 'mychannel', could not successfully apply update to template configuration: error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied的问题。。。求解

我在网上搜了很多这方面的资料,不过英文的居多,有点看不太懂~~,希望有大佬给我解答下问题,或者有区块链的学习交流群能加入一起学习

阅读 644
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
宣传栏