【问题标题】:Unable to start Hyperledger Orderer - administrators must be declared when no admin ou classification is set无法启动 Hyperledger Orderer - 未设置管理员分类时必须声明管理员
【发布时间】:2021-01-06 20:39:12
【问题描述】:

我正在尝试在 K8s 中启动我的 HLF 网络。在有序启动时设置所有内容时,出现以下错误:

Main -> PANI 005 Failed validating bootstrap block: initializing channelconfig failed: could not create channel Consortiums sub-group config: setting up the MSP manager failed: administrators must be declared when no admin ou classification is set
panic: Failed validating bootstrap block: initializing channelconfig failed: could not create channel Consortiums sub-group config: setting up the MSP manager failed: administrators must be declared when no admin ou classification is set

我遵循与示例中的测试网络类似的设置:我让 Fabric-CA 生成证书并使用 NodeOU:

NodeOUs:
    Enable: true
    ClientOUIdentifier:
      Certificate: cacerts/hlf-ca--amvoxdlt-7054.pem
      OrganizationalUnitIdentifier: client
    PeerOUIdentifier:
      Certificate: cacerts/hlf-ca--amvoxdlt-7054.pem
      OrganizationalUnitIdentifier: peer
    AdminOUIdentifier:
      Certificate: cacerts/hlf-ca--amvoxdlt-7054.pem
      OrganizationalUnitIdentifier: admin
    OrdererOUIdentifier:
      Certificate: cacerts/hlf-ca--amvoxdlt-7054.pem
      OrganizationalUnitIdentifier: orderer

这是我用来生成 genesis.block 的 configtx.yaml

Orderer: &OrdererDefaults

  # Orderer Type: The orderer implementation to start
  OrdererType: etcdraft

  Addresses:
    - orderer0.amvox-dlt.io:7050

  # Batch Timeout: The amount of time to wait before creating a batch
  BatchTimeout: 3s

  # Batch Size: Controls the number of messages batched into a block
  BatchSize:

    # Max Message Count: The maximum number of messages to permit in a batch
    MaxMessageCount: 500

    # Absolute Max Bytes: The absolute maximum number of bytes allowed for
    # the serialized messages in a batch.
    AbsoluteMaxBytes: 99 MB

    # Preferred Max Bytes: The preferred maximum number of bytes allowed for
    # the serialized messages in a batch. A message larger than the preferred
    # max bytes will result in a batch larger than preferred max bytes.
    PreferredMaxBytes: 512 KB

  EtcdRaft:
    Consenters:
      - Host: orderer0.amvox-dlt.io
        Port: 7050
        ClientTLSCert: /hlf_config/crypto-config/ordererOrganizations/amvox-dlt.io/orderers/orderer0.amvox-dlt.io/tls/server.crt
        ServerTLSCert: /hlf_config/crypto-config/ordererOrganizations/amvox-dlt.io/orderers/orderer0.amvox-dlt.io/tls/server.crt


  # Organizations is the list of orgs which are defined as participants on
  # the orderer side of the network
  Organizations:

  # Policies defines the set of policies at this level of the config tree
  # For Orderer policies, their canonical path is
  #   /Channel/Orderer/<PolicyName>
  Policies:
    Readers:
      Type: ImplicitMeta
      Rule: "ANY Readers"
    Writers:
      Type: ImplicitMeta
      Rule: "ANY Writers"
    Admins:
      Type: ImplicitMeta
      Rule: "MAJORITY Admins"
    # BlockValidation specifies what signatures must be included in the block
    # from the orderer for the peer to validate it.
    BlockValidation:
      Type: ImplicitMeta
      Rule: "ANY Writers"

  # Capabilities describes the orderer level capabilities, see the
  # dedicated Capabilities section elsewhere in this file for a full
  # description
  Capabilities:
    <<: *OrdererCapabilities

################################################################################
#
#   CHANNEL
#
#   This section defines the values to encode into a config transaction or
#   genesis block for channel related parameters.
#
################################################################################
Channel: &ChannelDefaults
  # Policies defines the set of policies at this level of the config tree
  # For Channel policies, their canonical path is
  #   /Channel/<PolicyName>
  Policies:
    # Who may invoke the 'Deliver' API
    Readers:
      Type: ImplicitMeta
      Rule: "ANY Readers"
    # Who may invoke the 'Broadcast' API
    Writers:
      Type: ImplicitMeta
      Rule: "ANY Writers"
    # By default, who may modify elements at this config level
    Admins:
      Type: ImplicitMeta
      Rule: "MAJORITY Admins"

  # Capabilities describes the channel level capabilities, see the
  # dedicated Capabilities section elsewhere in this file for a full
  # description
  Capabilities:
    <<: *ChannelCapabilities

################################################################################
#
#   Profile
#
#   - Different configuration profiles may be encoded here to be specified
#   as parameters to the configtxgen tool
#
################################################################################
Profiles:

  amvox-channel:
    Consortium: AmvoxConsortium
    <<: *ChannelDefaults
    Application:
      <<: *ApplicationDefaults
      Organizations:
        - *Amvox
        - *Org2
        - *Org3
      Capabilities:
        <<: *ApplicationCapabilities

  OrdererGenesis:
    <<: *ChannelDefaults
    Orderer:
      <<: *OrdererDefaults
      OrdererType: etcdraft
      EtcdRaft:
        Consenters:
          - Host: orderer0.amvox-dlt.io
            Port: 7050
            ClientTLSCert: /hlf_config/crypto-config/ordererOrganizations/amvox-dlt.io/orderers/orderer0.amvox-dlt.io/tls/server.crt
            ServerTLSCert: /hlf_config/crypto-config/ordererOrganizations/amvox-dlt.io/orderers/orderer0.amvox-dlt.io/tls/server.crt
      Addresses:
        - orderer0.amvox-dlt.io:7050

      Organizations:
        - *AmvoxDLT
      Capabilities:
        <<: *OrdererCapabilities

    Application:
      <<: *ApplicationDefaults
      Organizations:
        - <<: *AmvoxDLT

    Consortiums:
      AmvoxConsortium:
        Organizations:
          - *Amvox
          - *Org2
          - *Org3

有人知道为什么ordered 不能上手吗?

【问题讨论】:

  • 您能检查一下cacerts/hlf-ca--amvoxdlt-7054.pem 是否没有拼写错误并且匹配良好吗?
  • 一切都在那里。没有错字;/
  • 您是否生成了 config.yaml 已放置 到 msp 目录的创世块?在我的情况下,在生成创世块之前放置 config.yaml 解决了同样的问题。
  • config.yaml 已经存在。问题在于正确生成证书并将它们放置在正确的文件夹结构中。我得到的一个后缀是监控 genesis.block。 ` configtxlator proto_decode --input=/channel-artifacts/genesis.block --type=common.Block `
  • 我发现的最后一件事是我一直在将两个身份注册到同一个文件夹(两个管理员,这也导致证书不匹配)。

标签: hyperledger-fabric hyperledger-fabric-ca


【解决方案1】:

当您启用节点 OU 时,请确保在提供 MSP 时,它应该有 config.yaml 提及所有节点 ou 示例配置文件如下所示。

  NodeOUs:
  Enable: true
  ClientOUIdentifier:
    Certificate: cacerts/localhost-7054-ca-org1-example-com.pem
    OrganizationalUnitIdentifier: client
  PeerOUIdentifier:
    Certificate: cacerts/localhost-7054-ca-org1-example-com.pem
    OrganizationalUnitIdentifier: peer
  AdminOUIdentifier:
    Certificate: cacerts/localhost-7054-ca-org1-example-com.pem
    OrganizationalUnitIdentifier: admin
  OrdererOUIdentifier:
    Certificate: cacerts/localhost-7054-ca-org1-example-com.pem
    OrganizationalUnitIdentifier: orderer

【讨论】:

  • 你的意思是config.yaml
  • 是的,config.yaml
猜你喜欢
  • 1970-01-01
  • 2012-05-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-03-23
  • 1970-01-01
  • 2022-11-17
相关资源
最近更新 更多